linearlayout is a linear layout control. Its child controls are arranged horizontally or vertically. sort all widgets or other containers, beyond the boundary, some controls will be missing or disappear. therefore, each row in a vertical list only has one widget or container , no matter how wide they are, A horizontal list will only have one row height (the height is the height of the top sub-control plus the border height ). linearlayout maintains the interval and alignment between the widgets or iner contained by linearlayout (relative to a control ). ).
Android: id -- specify the corresponding ID for the Control
Android: text -- specify the text displayed in the control. Note that strings should be used as much as possible here. string in the XML file
Android: grimace -- specifies the basic position of the control, such as center, right, and so on.
Android: textsize -- specify the font size of the Control
Android: background -- specify the background color used by the control, RGB naming method
Android: width -- specify the width of the Control
Android: height -- specify the height of the Control
Android: padding * -- specify the padding of the control, that is to say, the content in the Control
Android: sigleline -- if set to true, the control content is displayed in the same row
<? 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"> <! -- Android: id -- specify the corresponding ID Android: text for the control -- specify the text displayed in the control. Note that strings should be used as much as possible here. the Android: grimace character string in the XML file specifies the basic position of the control, for example, center, right, and other places. Android: textsize: Specifies the font size of the Control. Android: background -- specifies the background color used by the control. The RGB naming method is Android: width -- specifies the width of the Control. Android: height -- specifies the height of the Control. Android: padding * -- specifies the padding of the control, that is to say, the content in the control is Android: sigleline -- if set to true, the control content is displayed in the same line --> <textviewandroid: Id = "@ + ID/firsttext" Android: TEXT = "first line" Android: gravity = "center_vertical" Android: textsize = "5pt" Android: Background = "# aa0000" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_weight = "1" Android: textcolor = "#000000" Android: singleline = "true"/> <textviewandroid: id = "@ + ID/secondtext" Android: text = "Row 2" Android: gravity = "center_vertical" Android: textsize = "15pt" Android: background = "# 0000aa" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_weight = "1"/> </linearlayout>