<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">

    <com.ttiglobal.suzuki.training.ui.VideoGridContainer
        android:id="@+id/live_video_grid_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <RelativeLayout
        android:id="@+id/autoHideLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/trainingTitle"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:background="#CC9e9e9e"
            android:drawableTint="@color/material_white"
            android:gravity="center"
            android:paddingStart="10dp"
            android:paddingEnd="10dp"
            android:textColor="@color/material_white"
            android:textSize="17sp"
            android:textStyle="bold" />

        <RelativeLayout
            android:id="@+id/live_room_top_layout"
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_below="@id/trainingTitle">

            <com.ttiglobal.suzuki.util.TimerTextView
                android:id="@+id/timerView"
                android:layout_width="wrap_content"
                android:layout_height="25dp"
                android:layout_marginTop="15dp"
                android:layout_marginEnd="10dp"
                android:layout_toLeftOf="@id/participantCount"
                android:background="#CC9e9e9e"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:paddingStart="6dp"
                android:paddingEnd="6dp"
                android:text="00:00:00"
                android:textColor="@color/white"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/participantCount"
                android:layout_width="wrap_content"
                android:layout_height="25dp"
                android:layout_alignParentEnd="true"
                android:layout_marginTop="15dp"
                android:layout_marginEnd="15dp"
                android:background="#CC9e9e9e"
                android:drawableStart="@drawable/eye"
                android:drawablePadding="5dp"
                android:drawableTint="@color/material_white"
                android:gravity="center"
                android:paddingStart="4dp"
                android:paddingEnd="10dp"
                android:text="10"
                android:textColor="@color/material_white"
                android:textStyle="bold" />

            <RelativeLayout
                android:id="@+id/live_name_space_layout"
                android:layout_width="wrap_content"
                android:layout_height="35dp"
                android:layout_alignParentStart="true"
                android:layout_marginStart="10dp"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="50dp"
                android:layout_toStartOf="@id/timerView"
                android:background="@drawable/live_name_board_bg">

                <com.github.siyamed.shapeimageview.CircularImageView
                    android:id="@+id/live_name_board_icon"
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:layout_alignParentStart="true"
                    android:layout_centerVertical="true"
                    android:layout_marginStart="2dp"
                    android:contentDescription="@string/app_name"
                    android:scaleType="fitCenter"
                    android:src="@drawable/fake_user_icon" />

                <TextView
                    android:id="@+id/live_room_name"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignParentTop="true"
                    android:layout_marginStart="6dp"
                    android:layout_toEndOf="@id/live_name_board_icon"
                    android:ellipsize="marquee"
                    android:gravity="center|start"
                    android:marqueeRepeatLimit="marquee_forever"
                    android:singleLine="true"
                    android:textAlignment="gravity"
                    android:textColor="@color/btn_bg_color"
                    android:textSize="14sp" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/permissionLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/live_name_space_layout"
                android:layout_alignParentBottom="true"
                android:layout_marginStart="6dp"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="6dp"
                android:background="#CC9e9e9e">

                <TextView
                    android:id="@+id/infoText"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_centerInParent="true"
                    android:layout_marginEnd="10dp"
                    android:layout_toStartOf="@id/actionLayout"
                    android:paddingStart="6dp"
                    android:text="Request permission to present"
                    android:textColor="@color/white"
                    android:textStyle="bold" />

                <LinearLayout
                    android:id="@+id/actionLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:layout_centerInParent="true"
                    android:layout_marginEnd="4dp">

                    <Button
                        android:id="@+id/decline"
                        android:layout_width="wrap_content"
                        android:layout_height="25dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/btn_login_shadow_red"
                        android:gravity="center"
                        android:paddingStart="10dp"
                        android:paddingEnd="10dp"
                        android:text="Decline"
                        android:textAllCaps="false"
                        android:textColor="@color/white"
                        android:textSize="13sp" />

                    <Button
                        android:id="@+id/accept"
                        android:layout_width="wrap_content"
                        android:layout_height="25dp"
                        android:background="@drawable/btn_login_shadow"
                        android:paddingStart="10dp"
                        android:paddingEnd="10dp"
                        android:text="Accept"
                        android:textAllCaps="false"
                        android:textColor="@color/white"
                        android:textSize="13sp" />
                </LinearLayout>
            </RelativeLayout>
        </RelativeLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/chatView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_above="@id/chatLayout"
            android:layout_below="@id/live_room_top_layout"
            android:layout_alignParentStart="true"
            android:layout_marginStart="12dp"
            android:layout_marginTop="30dp"
            android:layout_marginEnd="50dp"
            android:layout_marginBottom="12dp"
            android:background="@android:color/transparent"
            android:minWidth="150dp"
            app:stackFromEnd="true" />

        <RelativeLayout
            android:id="@+id/chatLayout"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_alignParentBottom="true"
            android:layout_marginStart="3dp"
            android:layout_marginEnd="3dp"
            android:layout_marginBottom="62dp"
            android:background="@drawable/edt_comment_border">

            <EditText
                android:id="@+id/comments"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_alignParentStart="true"
                android:layout_margin="4dp"
                android:layout_toLeftOf="@id/devider"
                android:background="@android:color/transparent"
                android:gravity="start|center"
                android:hint="Enter Comment"
                android:importantForAutofill="no"
                android:inputType="textCapSentences"
                android:maxLines="1"
                android:paddingStart="12dp"
                android:paddingEnd="12dp"
                android:textColor="@color/btn_bg_color" />

            <View
                android:id="@+id/devider"
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@id/send"
                android:background="#C7C5C5" />

            <ImageButton
                android:id="@+id/send"
                android:layout_width="60dp"
                android:layout_height="match_parent"
                android:layout_alignParentEnd="true"
                android:background="@android:color/transparent"
                android:contentDescription="@string/app_name"
                android:padding="12dp"
                android:scaleType="fitStart"
                android:src="@drawable/send_vc" />
        </RelativeLayout>

        <LinearLayout
            android:id="@+id/bottom_container"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_alignParentBottom="true"
            android:background="@color/btn_bg_color"
            android:padding="4dp">

            <ImageView
                android:id="@+id/live_btn_switch_camera"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:layout_marginStart="6dp"
                android:background="@drawable/rounded_bg_full_transparent"
                android:contentDescription="@string/app_name"
                android:onClick="onSwitchCameraClicked"
                android:scaleType="centerCrop"
                android:src="@drawable/btn_switch_camera" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="20" />

            <ImageView
                android:id="@+id/live_btn_mute_video"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg_full_transparent"
                android:contentDescription="@string/app_name"
                android:onClick="onMuteVideoClicked"
                android:scaleType="centerCrop"
                android:src="@drawable/btn_mute_video" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="20" />

            <ImageView
                android:id="@+id/leaveButton"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg_full_transparent"
                android:contentDescription="@string/app_name"
                android:onClick="onLeaveClicked"
                android:padding="2dp"
                android:scaleType="centerCrop"
                android:src="@drawable/btn_hangup"
                android:tint="@color/white" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="20" />

            <ImageView
                android:id="@+id/live_btn_mute_audio"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg_full_transparent"
                android:contentDescription="@string/app_name"
                android:onClick="onMuteAudioClicked"
                android:scaleType="centerCrop"
                android:src="@drawable/btn_mute_audio" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="20" />

            <ImageView
                android:id="@+id/switch_speaker_id"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:layout_marginEnd="6dp"
                android:background="@drawable/rounded_bg_full_transparent"
                android:contentDescription="@string/app_name"
                android:onClick="onSwitchSpeakerClicked"
                android:padding="2dp"
                android:scaleType="centerCrop"
                android:src="@drawable/btn_speaker" />

        </LinearLayout>
    </RelativeLayout>
</RelativeLayout>
