<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_clingo_video_call"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.VideoCallActivity">
    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center_horizontal"
        android:keepScreenOn="true"
        android:clickable="true">

        <LinearLayout
            android:id="@+id/subscriberview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:orientation="horizontal"/>

        <RelativeLayout
            android:id="@+id/publisherview"
            android:layout_height="200dp"
            android:layout_width="150dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:paddingRight="@dimen/activity_horizontal_margin" />
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/remote_video_view_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/remoteBackground">
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/icon_padding">

            <ImageView
                android:layout_width="@dimen/remote_back_icon_size"
                android:layout_height="@dimen/remote_back_icon_size"
                android:layout_centerInParent="true"
                android:src="@drawable/video_off_fill" />
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/icon_padding"
            android:layout_width="match_parent"
            android:layout_height="@dimen/remote_back_icon_margin_bottom"
            android:layout_alignParentBottom="true"/>
    </RelativeLayout>

    <FrameLayout
        android:id="@+id/local_video_view_container"
        android:layout_width="@dimen/local_preview_width"
        android:layout_height="@dimen/local_preview_height"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginEnd="@dimen/local_preview_margin_right"
        android:layout_marginRight="@dimen/local_preview_margin_right"
        android:layout_marginTop="@dimen/local_preview_margin_top"
        android:background="@color/localBackground">

        <ImageView
            android:layout_width="@dimen/local_back_icon_size"
            android:layout_height="@dimen/local_back_icon_size"
            android:layout_gravity="center"
            android:scaleType="centerCrop"
            android:src="@drawable/video_off_fill" />
    </FrameLayout>

    <RelativeLayout
        android:id="@+id/control_panel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="60dp">

        <ImageView
            android:id="@+id/btn_call"
            android:layout_width="71dp"
            android:layout_height="71dp"
            android:layout_centerInParent="true"
            android:onClick="onCallClicked"
            android:scaleType="centerCrop"
            android:src="@drawable/call" />

        <ImageView
            android:id="@+id/btn_switch_camera"
            android:layout_width="39dp"
            android:layout_height="39dp"
            android:layout_centerVertical="true"
            android:layout_marginLeft="@dimen/control_bottom_horizontal_margin"
            android:layout_toEndOf="@id/btn_camera"
            android:layout_toRightOf="@id/btn_camera"
            android:onClick="onSwitchCameraClicked"
            android:scaleType="centerCrop"
            android:src="@drawable/flip_enabled" />

        <ImageView
            android:id="@+id/btn_camera"
            android:layout_width="39dp"
            android:layout_height="39dp"
            android:layout_centerVertical="true"
            android:layout_marginLeft="@dimen/control_bottom_horizontal_margin"
            android:layout_toEndOf="@id/btn_call"
            android:layout_toRightOf="@id/btn_call"
            android:onClick="onCameraClicked"
            android:scaleType="centerCrop"
            android:src="@drawable/video_enabled" />

        <ImageView
            android:id="@+id/btn_mic"
            android:layout_width="39dp"
            android:layout_height="39dp"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/control_bottom_horizontal_margin"
            android:layout_toStartOf="@id/btn_call"
            android:layout_toLeftOf="@id/btn_call"
            android:onClick="onMicClicked"
            android:scaleType="centerCrop"
            android:src="@drawable/mic_enabled" />

        <ImageView
            android:id="@+id/btn_specker"
            android:layout_width="39dp"
            android:layout_height="39dp"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/control_bottom_horizontal_margin"
            android:layout_toStartOf="@id/btn_mic"
            android:layout_toLeftOf="@id/btn_mic"
            android:onClick="onSpeckerClicked"
            android:scaleType="centerCrop"
            android:src="@drawable/audio_enabled" />
    </RelativeLayout>

<!--    <RelativeLayout-->
<!--        android:id="@+id/progressBar"-->
<!--        android:layout_width="match_parent"-->
<!--        android:layout_height="40dp"-->
<!--        android:layout_alignParentBottom="true">-->

<!--        <ProgressBar-->
<!--            android:id="@+id/progress_bar"-->
<!--            android:layout_width="match_parent"-->
<!--            android:layout_height="31dp"-->
<!--            android:layout_alignParentEnd="true"-->
<!--            android:layout_alignParentBottom="true"-->
<!--            android:layout_marginEnd="0dp"-->
<!--            android:layout_marginBottom="0dp"-->
<!--            android:progressBackgroundTint="@color/colorProgressBarBackground"-->
<!--            style="@android:style/Widget.ProgressBar.Horizontal" />-->

<!--        <TextView-->
<!--            android:id="@+id/progress_bar_text"-->
<!--            android:layout_width="match_parent"-->
<!--            android:layout_height="wrap_content"-->
<!--            android:layout_marginLeft="9dp"-->
<!--            android:gravity="center_vertical"-->
<!--            android:textColor="@color/colorPrimary"-->
<!--            android:layout_centerInParent="true"/>-->

<!--    </RelativeLayout>-->

</RelativeLayout>
