<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingTop="17dp"
    tools:background="@color/color_25292e">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cs_header_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        app:layout_constraintTop_toTopOf="parent">

        <View
            android:id="@+id/bg_avatar"
            android:layout_width="0dp"
            android:layout_height="38dp"
            android:layout_marginLeft="11dp"
            android:layout_marginTop="2dp"
            android:background="@drawable/bg_gray_20dp_shape"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="@+id/tv_room_author_name"
            app:layout_constraintTop_toTopOf="parent" />

        <de.hdodenhof.circleimageview.CircleImageView
            android:id="@+id/iv_avatar"
            android:layout_width="34dp"
            android:layout_height="34dp"
            android:layout_marginStart="2dp"
            app:civ_circle_background_color="@color/white"
            app:layout_constraintBottom_toBottomOf="@+id/bg_avatar"
            app:layout_constraintLeft_toLeftOf="@+id/bg_avatar"
            app:layout_constraintTop_toTopOf="@+id/bg_avatar" />

        <TextView
            android:id="@+id/tv_room_author_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="9dp"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:maxLines="1"
            android:paddingEnd="17dp"
            android:text=""
            android:textColor="@color/white"
            android:textSize="@dimen/sp_18"
            app:layout_constraintBottom_toBottomOf="@+id/bg_avatar"
            app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
            app:layout_constraintTop_toTopOf="@+id/bg_avatar"
            tools:text="唐老唐老师唐老师师" />

        <LinearLayout
            android:id="@+id/ll_member_num_bg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="15dp"
            android:background="@drawable/bg_gray_20dp_shape"
            android:gravity="center_vertical"
            android:paddingStart="10dp"
            android:paddingTop="5dp"
            android:paddingEnd="10dp"
            android:paddingBottom="5dp"
            app:layout_constraintBottom_toBottomOf="@+id/bg_avatar"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="@+id/bg_avatar">

            <ImageView
                android:id="@+id/iv_number_people"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/icon_live_room_number_people" />

            <TextView
                android:id="@+id/tv_num_people"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                android:ellipsize="end"
                android:includeFontPadding="false"
                android:maxLines="1"
                android:text="0人"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_14"
                tools:text="176人" />
        </LinearLayout>

        <ImageView
            android:id="@+id/main_iv_reverse_camera"
            android:layout_marginEnd="10dp"
            app:layout_constraintRight_toLeftOf="@+id/ll_member_num_bg"
            app:layout_constraintBottom_toBottomOf="@+id/ll_member_num_bg"
            app:layout_constraintTop_toTopOf="@+id/ll_member_num_bg"
            android:src="@drawable/icon_main_reverse_camera"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <LinearLayout
            android:id="@+id/ll_like"
            android:layout_width="wrap_content"
            android:layout_height="22dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/bg_gray_20dp_shape"
            android:orientation="horizontal"
            android:paddingStart="7dp"
            android:paddingEnd="7dp"
            app:layout_constraintLeft_toLeftOf="@+id/bg_avatar"
            app:layout_constraintTop_toBottomOf="@+id/bg_avatar">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:src="@drawable/icon_like_num" />

            <TextView
                android:id="@+id/tv_add_like_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:includeFontPadding="false"
                android:paddingStart="2dp"
                android:text="本场点赞0"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_12"
                tools:text="本场点赞1240000000" />
        </LinearLayout>

        <FrameLayout
            android:id="@+id/fl_time_count"
            android:layout_width="wrap_content"
            android:layout_height="18dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/bg_gray_20dp_shape"
            app:layout_constraintLeft_toLeftOf="@+id/ll_like"
            app:layout_constraintTop_toBottomOf="@+id/ll_like">

            <TextView
                android:id="@+id/tv_time_count"
                android:layout_width="60dp"
                android:layout_height="15dp"
                android:layout_gravity="center"
                android:gravity="center"
                android:includeFontPadding="false"
                android:text="00:00:00"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_12" />

            <!--            弄2个TextView,是因为倒计时写成wrap_content,
                            会导致每次都需要重新测量TextView宽度,所以写死宽度-->
            <TextView
                android:id="@+id/tv_time_count_end_tip"
                android:layout_width="120dp"
                android:layout_height="15dp"
                android:layout_gravity="center"
                android:gravity="center"
                android:includeFontPadding="false"
                android:text="课程结束 00:00:00"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_12"
                android:visibility="gone" />
        </FrameLayout>


        <com.rong.io.live.widget.LiveRoomMicIconView
            android:id="@+id/ll_mic_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dp"
            android:layout_marginBottom="9dp"
            android:paddingStart="5dp"
            android:paddingEnd="5dp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/fl_time_count" />

        <LinearLayout
            android:id="@+id/ll_live_delay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="11dp"
            android:layout_marginEnd="15dp"
            android:background="@drawable/bg_gray_20dp_shape"
            android:gravity="center"
            android:orientation="horizontal"
            android:paddingStart="7dp"
            android:paddingTop="5dp"
            android:paddingEnd="7dp"
            android:paddingBottom="5dp"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/ll_member_num_bg">

            <ImageView
                android:id="@+id/iv_live_delay"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/icon_live_delay_normal"
                app:layout_constraintRight_toRightOf="parent" />

            <TextView
                android:id="@+id/tv_live_delay"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:includeFontPadding="false"
                android:paddingStart="3dp"
                android:text="0ms"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_12"
                app:layout_constraintBottom_toBottomOf="@+id/iv_live_delay"
                app:layout_constraintLeft_toRightOf="@+id/iv_live_delay"
                app:layout_constraintTop_toTopOf="@+id/iv_live_delay"
                tools:text="255ms" />

        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>


    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/tv_input"
        android:layout_width="0dp"
        android:layout_height="38dp"
        android:layout_marginStart="11dp"
        android:layout_marginEnd="11dp"
        android:layout_marginBottom="30dp"
        android:background="@drawable/bg_gray_20dp_shape"
        android:gravity="center_vertical"
        android:includeFontPadding="false"
        android:maxLines="10"
        android:paddingStart="16dp"
        android:text="和同学聊两句～"
        android:textColor="@color/color_90ffffff"
        android:textColorHint="@color/white"
        android:textSize="@dimen/sp_14"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/iv_mic" />

    <ImageView
        android:id="@+id/iv_chat_speak"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="11dp"
        android:src="@drawable/icon_live_room_chat_speak"
        app:layout_constraintBottom_toBottomOf="@+id/tv_input"
        app:layout_constraintRight_toRightOf="@+id/tv_input"
        app:layout_constraintTop_toTopOf="@+id/tv_input" />


    <ImageView
        android:id="@+id/icon_finish_live"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="11dp"
        android:layout_marginBottom="30dp"
        android:src="@drawable/icon_live_room_close_menu"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent" />

    <ImageView
        android:id="@+id/iv_mic"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="11dp"
        android:src="@drawable/icon_mic_contro"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/icon_finish_live"
        app:layout_constraintRight_toLeftOf="@+id/icon_finish_live"
        app:layout_constraintTop_toTopOf="@+id/icon_finish_live" />


    <TextView
        android:id="@+id/tv_on_mic_num_tip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/shape_live_on_mic_tip_bg"
        android:includeFontPadding="false"
        android:paddingStart="8dp"
        android:paddingTop="2dp"
        android:paddingEnd="8dp"
        android:paddingBottom="2dp"
        android:textColor="@color/white"
        android:visibility="gone"
        app:layout_constraintCircle="@+id/iv_mic"
        app:layout_constraintCircleAngle="45"
        app:layout_constraintCircleRadius="25dp"
        tools:ignore="MissingConstraints"
        tools:text="3" />

    <FrameLayout
        android:id="@+id/fl_recycler_container"
        android:layout_width="match_parent"
        android:layout_height="190dp"
        android:layout_marginBottom="10dp"
        android:paddingStart="11dp"
        android:paddingEnd="11dp"
        app:layout_constraintBottom_toTopOf="@+id/tv_input"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_msg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:overScrollMode="never"
            android:scrollbars="none" />
    </FrameLayout>

    <FrameLayout
        android:id="@+id/fl_join_barrage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="11dp"
        android:layout_marginBottom="10dp"
        android:background="@drawable/shape_live_barrage_for_join_msg"
        android:paddingStart="10dp"
        android:paddingTop="3dp"
        android:paddingEnd="10dp"
        android:paddingBottom="3dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/fl_recycler_container"
        app:layout_constraintLeft_toLeftOf="parent">

        <TextView
            android:id="@+id/tv_join_barrage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_13"
            tools:text="新雷 进入直播间" />

    </FrameLayout>

    <FrameLayout
        android:id="@+id/fl_snap_up_barrage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="11dp"
        android:layout_marginBottom="10dp"
        android:background="@drawable/shape_live_barrage_for_snap_up_msg"
        android:paddingStart="10dp"
        android:paddingTop="3dp"
        android:paddingEnd="10dp"
        android:paddingBottom="3dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/fl_recycler_container"
        app:layout_constraintLeft_toLeftOf="parent">

        <TextView
            android:id="@+id/tv_snap_up_barrage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableLeft="@drawable/icon_live_barrage_buy_tag"
            android:drawablePadding="4dp"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_13"
            tools:text="张予锡 正在去购买" />

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