1. Use linear layout (linearlayout) and relative layout (relativelayout) As far as possible, and do not use absolute layout.
2. Use dip and SP as far as possible and do not use PX.
3. Provide different layout files and pictures for different resolutions.
For example:
4. Set the multi-resolution support in Androidmainfest.xml.
1 <supports-Screens 2 android:largescreens= "true"3 android:normalscreens= "true" 4 android:anydensity= "true" 5 android:smallscreens= "true"/>
To summarize:
1)android:anydensity="true", the system will automatically find the corresponding folder according to the screen density.
2)android:anydensity="false"
(1) If the drawable-hdpi,drawable-mdpi,drawable-ldpi three folders have different density of the same picture resource, then the system will load the resources in the drawable_mdpi folder.
(2) If there is a high density image in the drawable-hpdi, the other two folders do not have the corresponding picture resources, then the system will load the resources in the drawable-hdpi.
(3) If there is a picture resource in the drawable-hdpi,drawable-mdpi,there is no corresponding picture resource in the drawable-ldpi, then the system will load the resources in the Drawable-mdpi folder.
Reference Blog: http://blog.sina.com.cn/s/blog_74c22b210100tn3o.html
Reprint __android-screen adaptation needs to pay attention to the place