Android systems can be deployed in the following ways:
1. LinearLayout-linear Layout
Yes. All components on the page are laid in a linear layout,
Vertical:
Android: orientation = "vertical" indicates to form a vertical column;
Horizontal level:
Android: orientation = "horizontal"
<? Xml version = "1.0" encoding = "UTF-8"?>
<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
Android: orientation = "horizontal"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
>
<TextView
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: text = "@ string/mobile"
Android: id = "@ + id/cancelable"
/>
<EditText
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: id = "@ + id/mobilenumer"
/>
<TextView
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: text = "@ string/smslable"
Android: id = "@ + id/smslable"
/>
<EditText
Android: layout_width = "match_parent"
Android: layout_height = "wrap_content"
Android: minLines = "3"
Android: id = "@ + id/messages"
/>
<Button
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: text = "@ string/send_button"
Android: id = "@ + id/sms_button"
/>
</LinearLayout>
2. AbsoluteLayout-absolute Layout
Layout Method:
1) define an id for each component, for example, a component: android: id = "@ + id/linearlayout"
2) For example, if another component is located at the bottom of the component, set it to android: layout_below = "@ id/linearlayout" in the group"
3) to the right of the parent control: android: layout_alignParentRight = "true"
There are other usage methods, such as: on the left side of the parent control.
In fact, the layout of android is similar to that of table in Html. It can also be nested with labels.
<? Xml version = "1.0" encoding = "UTF-8"?>
<RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
>
<LinearLayout
Android: orientation = "horizontal"
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: id = "@ + id/linearlayout"
>
<TextView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: textSize = "18sp"
Android: text = "@ string/mobile"
Android: id = "@ + id/cancelable"
/>
<EditText
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: layout_toRightOf = "@ id/cancelable"
Android: id = "@ + id/mobilenumer"
/>
</LinearLayout>
<TextView
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: layout_below = "@ id/linearlayout"
Android: textSize = "18sp"
Android: text = "@ string/smslable"
Android: id = "@ + id/smslable"
/>
<EditText
Android: layout_width = "match_parent"
Android: layout_height = "wrap_content"
Android: layout_below = "@ id/smslable"
Android: minLines = "3"
Android: id = "@ + id/messages"
/>
<Button
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_below = "@ id/messages"
Android: layout_alignParentRight = "true"
Android: text = "@ string/send_button"
Android: id = "@ + id/sms_button"
/>
</RelativeLayout>
3. RelativeLayout (relative layout)
4. TableLayout (table layout) and FrameLayout (frame layout)