PrefaceAndroidDiverse mobile phone resolutions,In this way, our applications must be adapted to devices with multiple resolutions..
There are three main considerations for applications:
1)Interface Configuration
Create mobile phone interface files based on different resolutions
Example:
InResCreateLayout-800x480
Layout-480x320
Create interface files in folders with different resolutions
2)Image Configuration
The aspect ratio of the interface varies with different resolutions. Images of different specifications are required.
InDrawable-hdpi,Drawable-ldpi,Drawable-mdpiPlace images of different resolutions
3) Dynamically implemented interface and style settings
Different resolutions, UI font sizes, fonts, and other styles need to be dynamically generated, and configuration information for different resolutions needs to be saved to the application.
For exampleResCreateValues-480x320 values-800x400
In the created folder, createString. xml
<Dimen name = "text_size"> 30px </dimen>
InProgramDirectly callingR. dimen. text_size