<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
    android:paddingBottom="@dimen/dp_10">


    <androidx.cardview.widget.CardView
        android:id="@+id/mCard"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/dp_10"
        android:visibility="gone"
        app:cardBackgroundColor="@color/transparent_50"
        app:cardCornerRadius="@dimen/dp_3"
        app:cardElevation="@dimen/dp_0"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/mTime"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="@dimen/dp_10"
            android:paddingTop="@dimen/dp_3"
            android:paddingRight="@dimen/dp_10"
            android:paddingBottom="@dimen/dp_3"
            android:text="昨天"
            android:textColor="@color/white" />
    </androidx.cardview.widget.CardView>

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/mLeftImage"
        android:layout_width="@dimen/dp_40"
        android:layout_height="@dimen/dp_40"
        android:layout_margin="@dimen/dp_10"
        android:src="@mipmap/ic_default_man"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/mCard" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/mLin"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintHorizontal_weight="2"
        app:layout_constraintRight_toLeftOf="@+id/mView"
        app:layout_constraintLeft_toRightOf="@+id/mLeftImage"
        app:layout_constraintTop_toTopOf="@+id/mLeftImage">

        <!--纯文字展示-->
        <TextView
            android:id="@+id/mLeftMsg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:background="@drawable/shape_left_bubble"
            android:padding="@dimen/dp_10"
            android:text=""
            android:textColor="@color/black"
            android:textSize="@dimen/dp_15"
            android:visibility="invisible"
            android:textIsSelectable="true"
            android:layout_marginLeft="@dimen/dp_10"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


        <!--音频展示-->

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/mAudioLeftBg"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <TextView
                android:id="@+id/mAudioTime"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="14''"
                app:layout_constraintLeft_toRightOf="@+id/id_recorder_length"
                app:layout_constraintTop_toTopOf="@+id/id_recorder_length"
                android:gravity="center_vertical"
                android:textColor="@color/black"
                android:textSize="@dimen/dp_15" />

            <LinearLayout
                android:id="@+id/id_recorder_length"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/chatto_bg_focused_left"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:gravity="center_vertical"
                android:orientation="vertical">

                <ImageView
                    android:id="@+id/id_recorder_anim"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:layout_gravity="center_vertical|left"
                    android:background="@drawable/play_sound_left_default" />

            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/mCenter"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.5" />


        <!--图片 和视频展示-->
        <androidx.cardview.widget.CardView
            android:id="@+id/mVideoLeftBg"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:scaleType="centerCrop"
            android:visibility="gone"
            app:cardBackgroundColor="@color/col_919"
            app:cardCornerRadius="@dimen/dp_10"
            app:cardElevation="@dimen/dp_0"
            app:layout_constraintDimensionRatio="w,1.2:1"
            app:layout_constraintLeft_toRightOf="@+id/mCenter"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <ImageView
                    android:id="@+id/mLeftPhoto"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:scaleType="centerCrop"
                    app:layout_constraintDimensionRatio="w,1.2:1"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <ImageView
                    android:id="@+id/mPlay"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:src="@drawable/ic_play_white" />

            </RelativeLayout>

        </androidx.cardview.widget.CardView>

    </androidx.constraintlayout.widget.ConstraintLayout>


    <View
        android:id="@+id/mView"
        android:layout_width="0dp"
        android:layout_height="1dp"
        app:layout_constraintHorizontal_weight="1"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/mLin"
        app:layout_constraintTop_toTopOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>