<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
    android:layout_gravity="right"
    android:layout_margin="5dp"
    android:orientation="horizontal"
    android:padding="8dp"
    tools:background="@color/gray_f4">


    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginRight="5dp"
        android:layout_weight="1"
        android:gravity="right">

        <RelativeLayout
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_marginTop="5dp"
            android:layout_marginRight="5dp"
            android:layout_toLeftOf="@id/tv_content">

            <ProgressBar
                android:id="@+id/pb_sending"
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:layout_centerInParent="true"
                android:indeterminateBehavior="repeat"
                android:indeterminateDrawable="@drawable/anim_loading" />

            <ImageView
                android:id="@+id/iv_msg_state_fail"
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:layout_centerInParent="true"
                android:src="@drawable/msg_state_fail_resend"
                android:visibility="gone"
                tools:visibility="visible" />
        </RelativeLayout>


        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:gravity="right|center_vertical"
            android:orientation="horizontal">

            <com.tenlionsoft.baselib.core.widget.views.BubbleImageView
                android:id="@+id/iv_content"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_alignParentStart="true"
                android:layout_marginStart="0dp"
                android:adjustViewBounds="true"
                android:scaleType="centerCrop"
                android:transitionName="sharedView"
                app:angle="6dp"
                app:arrowHeight="8dp"
                app:arrowLocation="right"
                app:arrowPosition="15dp"
                app:arrowWidth="5dp" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:src="@drawable/ic_play_white_icon_48" />
        </RelativeLayout>
    </LinearLayout>

    <ImageView
        android:id="@+id/iv_user_icon"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_alignParentRight="true"
        android:scaleType="fitXY"
        android:src="@drawable/ic_user_default" />

</LinearLayout>