On Android, an activity takes up the screen by default, but we can also let him apply to a dialog box theme, making him a dialog box.
After you create a new Android project, modify the Androidmanifest.xml, add the theme attribute in it, 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/59 /b0/wkiol1tcq5_qdeonaaf15c9valu369.jpg "title=" Qq20150212140604.png "alt=" wkiol1tcq5_qdeonaaf15c9valu369.jpg "/ >
After clicking Save, Run: Such as
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/B3/wKiom1TcQy3C18bCAACt3fcCCwI666.jpg "title=" 1.png " alt= "Wkiom1tcqy3c18bcaact3fcccwi666.jpg"/>
Finally, we can hide the title, add code 650 in Mainactivity.java) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/59/B3/ Wkiom1tcq5jtxujzaafs7wtv8aw906.jpg "title=" 3.png "alt=" Wkiom1tcq5jtxujzaafs7wtv8aw906.jpg "/>
Note: The code must be added before setcontentview this sentence, otherwise it will run the error, as the result
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/B3/wKiom1TcQ9nRCCzVAABw9ql3qeE310.jpg "title=" 2.png " alt= "Wkiom1tcq9nrcczvaabw9ql3qee310.jpg"/>
This article is from the "Useless Uncle" blog, please be sure to keep this source http://aslonely.blog.51cto.com/6552465/1614025
Android change activity style and hide title