1Adaptive Image --- 9 patchImage
Compared with a traditional png image, a 9.png image consists of an edge composed of one pixel around the image. This edge is used to define the expanded exhibition area and content display area of the image.
Images in this format can be adjusted automatically in the android environment.
(1) developers are allowed to define extensible areas. When you need to extend an image to fill a region larger than the image itself, the content of the expanded area is extended.
(2) allow developers to define content display areas for displaying text or other content
2Magic control property: layout_weight
Layout_weightAttribute
Attribute meaning: Set the space allocated to the control. The default value is 0, and the control remains unchanged. If the property is greater than 0, the remaining controls on the screen are allocated to the control.
3Three la s in the upper and lower layers, and adaptive parts in the middle
PassRelationlayoutIn the last subitem, set android: layout_width ="Fill_parent"
Android: layout_height ="Fill_parent"
Automatic Adaptation
Principle: Use the relative layout to set the upper and lower absolute positions first, and then the middle control can automatically adapt
4Devices with small resolutions cannot be placed in the interface layout.
Use the scroll bar directly
5When setting the widget size, useDpInsteadPx