Method for setting the size of Android pop-up activity
How to set the size of the activity so that your window no longer looks full screen. Some netizens may know that it is implemented through themes such as theme. Dialog, but tell you the principle of setting the activity not to be displayed in full screen. Android theme is mainly implemented by defining style. You can directly see the definition in the Android framework. Today, we give a simpler but relatively flexible method. For example, do not use the border in theme.dialog. Let's take a look at the implementation method of customizing the size of activity.
1. Create a style file to your project and save it in RES / values / styles.xml. The file name here cannot be modified arbitrarily. The content is. Note that UTF-8 coding is used when saving.
Java code
Java code
3. Finally, in Android manifest.xml, add an Android: theme attribute to your activity node with the value of @ style / theme.android123