1. In the AndroidManifest. xml file, declare that the theme of the activity uses the custom dialog box style. & Lt; activityandroid: name & quot ;. sensorGetValueActivity & quot; android: label & quot; @ string/activity_custom_dialog & qu 1. AndroidManifest. in the xml file, declare that the theme of the activity uses the custom dialog box style.
Android: label = "@ string/activity_custom_dialog"
Android: theme = "@ style/Theme. CustomDialog">
2. Define a Dialog box Theme style in the res/values/styles. xml style file, which inherits the android: style/Theme. dieme topic, www.2cto.com
And the window style android: windowBackground references @ drawable/filled_box
3. res/drawable/filled_box.xml defines the drawable (Abstract printable area) of the Shape type. It is used to implement the style of the new dialog box.
Android: right = "10dp" android: bottom = "10dp"/>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service