The Hello World example is an example of a basic screen display Activity. Mainly XML:
1. <TextView xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@ + id/text"
2. android: layout_width = "match_parent" android: layout_height = "match_parent"
3. android: gravity = "center_vertical | center_horizontal"
4. android: text = "@ string/hello_world"/>
• Contains a simple TextView.
• Android: layout_width defines the www.2cto.com width of the element. match_parent indicates filling the width of the previous layer as much as possible, and wrap_content indicates the width of the adaptive element, that is, when the element content is too wide, it is too wide; layout_height is similar.
• Android: gravity defines the alignment of elements, which are horizontally centered and vertically centered.
From Xiao He's exposure to sharp corners