1 Toggle Screen:
The file name is the same. Directory is different.
layout-port/Stands for vertical screen
layout-land/Representative Horizontal screen
The layout/represents the layout directory regardless of what has no modifiers.
Finally the realization of the product solution:
Two sets of same name, single directory different layouts.
2 when the screen switch:
The code needs to infer the direction.
Due to the use of different layout.xml
Therefore, a code check is required.
3 for the size of the setting. Suggested uses:
Layout + style + dimension form
Layout screen
Style to set the dimensions cannot describe the comfort G:march_parent
Dimension to define a fixed size
4 Screen Adaptation principles:
What about 1 Jin ke linerlayout relativelayout
The properties of the layout in. Weapons are aligned using Margin_parent, warp_conent, margin or relationlayout project layouts.
2 Assume that you cannot use a comfortable size and use the DP attribute as much as possible.
5 SW screen never spins just focus on the shortest side!
1 large screens and small screens
The width is adapted in a values-w<xxx>dp manner.
A high degree of adaptation by means of a values-h<xxx>dp.
Suitable for the shortest side length by means of a VALUES-SW<XXX>DP
2 when SW<XXX>DP and H<XXX>DP all match,
Choose the resources of SW<XXX>DP.
Android Screen Adaptation course notes