<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="150dp"> <LinearLayout android:id="@+id/img_group" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true"> <ImageView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher"/> <ImageView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher"/> <ImageView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher"/> <ImageView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher"/> </LinearLayout> <LinearLayout android:layout_below="@id/img_group" android:layout_marginTop="5dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:gravity="center" android:text="123123" android:textSize="18sp"/> <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:gravity="center" android:text="123123" android:textSize="18sp"/> <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:gravity="center" android:text="123123" android:textSize="18sp"/> <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:gravity="center" android:text="sdfsdfsdfsdfsdfsfdsdfsdfsdfsdfsdfsdf" android:textSize="18sp"/> </LinearLayout> </RelativeLayout>
图片居中,文字在图片下面显示,可以多行显示
最新推荐文章于 2023-02-02 11:16:18 发布