Causes of fragmentation:
1. Screen size small normal large xlarge xxlarge
2. Screen resolution
3. Horizontal vertical screen
4. System version
Resolution of the Fragment:
1, Dp/sp
The system does not provide a unit that can circumvent partial fragmentation
2. For different versions
The system provides a ANDROID-SUPPORT-V4 package that allows the lower version of the system to achieve a higher version of the functionality
Referencing external open-source projects
3. Solve Horizontal vertical screen
Steps:
Create an XML layout file with the same file name and the same ID for the corresponding control
Resource Type--->layout--->next
Note: Other ways to solve the problem of horizontal vertical screen
Phenomenon: When you switch the screen, the system re-invokes the life cycle
Processing:
Set properties for activity, in the manifest file
Android:configchanges= "Orientation|keyboardhidden|screensize"
Set the orientation of the screen
Some specific applications, such as music players, can set the screen orientation to death
To set the activity's properties in the manifest file
android:screenorientation= "Portrait"
Portrait: Vertical Screen
Landscape: Horizontal Screen