Android:布局
- LinearLayout
- RelativeLayout
- FrameLayout
- TableLayout
- GridLayout
- ConstraintLayout
LinearLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_height="match_parent"android:layout_width="match_parent"android:orientation="vertical">
android:gravity="center" #子元素的布局位置
RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_height="match_parent"android:layout_width="match_parent"android:orientation="vertical">
FrameLayout
<FrameLayoutandroid:layout_width="match_parent"android:foreground="@color/black"android:foregroundGravity="center"android:layout_height="match_parent"/>
TableLayout
GridLayout
ConstraintLayout
约束布局,永远的神!