In the project to adapt to a comprehensive screen of a simple number of adaptation methods recorded (easy to modify the optimization)
1. Modification of the manifest file
Add the following snippet below the application tag of the App androidmanifest:
<meta-data android:name= "Android.max_aspect" android:value= "2.1"/>
To explain the following:
Ratio_float is a floating-point number, the official recommendation is 2.1 or greater, because 18.5:9=2.055555555 ..., if you later appear in the larger aspect ratio of the phone, this value will need to be set to greater.
2. New Project's Gallery file
Full screen adaptation needs to be placed in this folder
3. Adaptation of the start diagram (the results of the discussion)
Here is the layout file for the start diagram, which requires type Centercrop
Because this can be adapted to the upper and lower cutting, left and right cutting, talk about the results of cutting, to 16:9 of the mobile phone as an example, the plot up or down must be more than 18:9 or 20:9 or more can be done 2160*1080 or larger, million can not be small, large crop display, small will leave blank.
By: Leilei tua
The full screen method used in the Android project