1.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_marginStart="49dp" android:layout_marginTop="48dp" android:src="@mipmap/ic_launcher_round" /> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/imageView" android:layout_marginStart="22dp" android:layout_toEndOf="@+id/imageView" android:text="狗不理包子" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignStart="@+id/textView" android:layout_below="@+id/textView" android:text="20元一个" /> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignStart="@+id/textView2" android:layout_below="@+id/textView2" android:text="又贵又不好吃" /> </RelativeLayout>