RelativeLayout简介
https://blog.youkuaiyun.com/YoNow/article/details/117672856?spm=1001.2014.3001.5501
实现QQ说说
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity3">
<ImageView
android:layout_width="wrap_content"
android:id="@+id/image"
android:layout_height="wrap_content"
android:background="@drawable/me_1">
</ImageView>
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="湖湖"
android:textSize="18sp"
android:textColor="#000000"
android:layout_toRightOf="@+id/image">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="今天 15:05"
android:layout_toRightOf="@+id/image"
android:layout_below="@+id/text">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text2"
android:textColor="#000000"
android:text="我会告诉你用“蓝湖”可以自动标注吗?"
android:layout_centerInParent="true"
android:textSize="18sp"
android:layout_below="@+id/image">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="浏览5次"
android:layout_below="@+id/text2"
>
</TextView>
<ImageView
android:layout_width="wrap_content"
android:id="@+id/image1"
android:layout_height="wrap_content"
android:background="@drawable/comment"
android:layout_below="@+id/text2"
android:layout_toRightOf="@+id/text2"
android:layout_margin="5dp">
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/zan"
android:layout_below="@+id/text2"
android:layout_toLeftOf="@+id/image1"
android:layout_margin="5dp">
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/zhaunfa"
android:layout_below="@id/text2"
android:layout_toRightOf="@+id/image1"
android:layout_margin="5dp">
</ImageView>
</RelativeLayout>