Create an interface for mobile phones with different resolutions
1. First, go to the res folder.
2, create a folder named layout-1024x768,
Among them, 1024x768 is the screen resolution size. It is worth noting that the large numbers in the resolution must be written before, no
A syntax error occurs. Such as layout-768x1024 is wrong.
3. Compile main. xml:
<? Xml version = "1.0" encoding = "UTF-8"?>
<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
Android: orientation = "vertical" android: layout_width = "fill_parent"
Android: layout_height = "fill_parent">
<TextView android: layout_width = "fill_parent"
Android: layout_height = "wrap_content" android: text = "@ string/hello"/>
<TextView android: layout_width = "fill_parent" android: id = "@ + id/TV"
Android: layout_height = "wrap_content" android: text = "1024x768"/>
</LinearLayout>
4. Directly copy main. xml in the folder where the layout-1280x800 resolution is created as described above.
5. Create the 1024x768 and 1280x800 simulators respectively:
6. Add <supports-screens android: largeScreens = "true" to AndroidManifest. xml"
Android: anyDensity = "true"/> otherwise, your application will not be in full screen.
For more information, see the example helloword.
7. layout by default. Do not delete it. If the specified resolution does not exist, layout will be called by default. If yes, an error is returned.