- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:orientation="vertical">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/icon"
- />
- </LinearLayout>
- <FrameLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/icon"
- android:layout_gravity="center"
- />
- </FrameLayout>
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/icon"
- android:layout_centerInParent="true"
- />
- </RelativeLayout>
LinearLayout、RelativeLayout、FrameLayout居中显示
最新推荐文章于 2022-06-26 16:51:08 发布