<?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:id="@+id/call_holder"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/caller_avatar"
        android:layout_width="@dimen/incoming_call_button_size"
        android:layout_height="@dimen/incoming_call_button_size"
        android:contentDescription="@string/accept"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.1"
        tools:src="@drawable/ic_call_accept" />

    <com.simplemobiletools.commons.views.MyTextView
        android:id="@+id/caller_name_label"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/normal_margin"
        android:gravity="center_horizontal"
        android:textSize="@dimen/caller_name_text_size"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/caller_avatar"
        tools:text="Caller name" />

    <com.simplemobiletools.commons.views.MyTextView
        android:id="@+id/caller_number_label"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/normal_margin"
        android:gravity="center_horizontal"
        android:textSize="@dimen/call_status_text_size"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/caller_name_label"
        tools:text="0912 345 678" />

    <com.simplemobiletools.commons.views.MyTextView
        android:id="@+id/call_status_label"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/normal_margin"
        android:alpha="0.8"
        android:textSize="@dimen/call_status_text_size"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/caller_number_label"
        tools:text="Is Calling" />

    <ImageView
        android:id="@+id/call_sim_image"
        android:layout_width="@dimen/normal_icon_size"
        android:layout_height="0dp"
        android:alpha="0.8"
        android:background="?selectableItemBackgroundBorderless"
        android:src="@drawable/ic_sim_vector"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/call_status_label"
        app:layout_constraintEnd_toStartOf="@+id/call_status_label"
        app:layout_constraintTop_toTopOf="@+id/call_status_label" />

    <TextView
        android:id="@+id/call_sim_id"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:alpha="0.8"
        android:gravity="center"
        android:textColor="@color/md_grey_black"
        android:textSize="@dimen/bigger_text_size"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/call_sim_image"
        app:layout_constraintEnd_toEndOf="@+id/call_sim_image"
        app:layout_constraintStart_toStartOf="@+id/call_sim_image"
        app:layout_constraintTop_toTopOf="@+id/call_sim_image"
        tools:text="1" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/ongoing_call_holder"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <ImageView
            android:id="@+id/call_toggle_microphone"
            android:layout_width="@dimen/dialpad_button_size"
            android:layout_height="@dimen/dialpad_button_size"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:padding="@dimen/medium_margin"
            android:src="@drawable/ic_microphone_vector"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.15"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.75" />

        <ImageView
            android:id="@+id/call_toggle_speaker"
            android:layout_width="@dimen/dialpad_button_size"
            android:layout_height="@dimen/dialpad_button_size"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:padding="@dimen/medium_margin"
            android:src="@drawable/ic_speaker_off_vector"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.75" />

        <ImageView
            android:id="@+id/call_dialpad"
            android:layout_width="@dimen/dialpad_button_size"
            android:layout_height="@dimen/dialpad_button_size"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:padding="@dimen/medium_margin"
            android:src="@drawable/ic_dialpad_vector"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.85"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.75" />

        <ImageView
            android:id="@+id/call_end"
            android:layout_width="@dimen/dialpad_button_size"
            android:layout_height="@dimen/dialpad_button_size"
            android:contentDescription="@string/decline"
            android:src="@drawable/ic_call_decline"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.9" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/incoming_call_holder"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <ImageView
            android:id="@+id/call_decline"
            android:layout_width="@dimen/incoming_call_button_size"
            android:layout_height="@dimen/incoming_call_button_size"
            android:contentDescription="@string/decline"
            android:src="@drawable/ic_call_decline"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.15"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.85" />

        <com.simplemobiletools.commons.views.MyTextView
            android:id="@+id/call_decline_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/normal_margin"
            android:text="@string/decline"
            android:textSize="@dimen/bigger_text_size"
            app:layout_constraintEnd_toEndOf="@+id/call_decline"
            app:layout_constraintStart_toStartOf="@+id/call_decline"
            app:layout_constraintTop_toBottomOf="@+id/call_decline" />

        <ImageView
            android:id="@+id/call_accept"
            android:layout_width="@dimen/incoming_call_button_size"
            android:layout_height="@dimen/incoming_call_button_size"
            android:contentDescription="@string/accept"
            android:src="@drawable/ic_call_accept"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.85"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.85" />

        <com.simplemobiletools.commons.views.MyTextView
            android:id="@+id/call_accept_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/normal_margin"
            android:text="@string/accept"
            android:textSize="@dimen/bigger_text_size"
            app:layout_constraintEnd_toEndOf="@+id/call_accept"
            app:layout_constraintStart_toStartOf="@+id/call_accept"
            app:layout_constraintTop_toBottomOf="@+id/call_accept" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <RelativeLayout
        android:id="@+id/dialpad_wrapper"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginBottom="@dimen/activity_margin"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/call_status_label">

        <com.simplemobiletools.commons.views.MyEditText
            android:id="@+id/dialpad_input"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/dialpad_include"
            android:layout_marginStart="@dimen/dialpad_button_size"
            android:layout_marginEnd="@dimen/medium_margin"
            android:layout_toStartOf="@+id/dialpad_close"
            android:gravity="center"
            android:inputType="phone"
            android:textCursorDrawable="@null"
            android:textSize="@dimen/dialpad_text_size" />

        <ImageView
            android:id="@+id/dialpad_close"
            android:layout_width="@dimen/normal_icon_size"
            android:layout_height="@dimen/normal_icon_size"
            android:layout_alignTop="@+id/dialpad_input"
            android:layout_alignBottom="@+id/dialpad_input"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:layout_marginEnd="@dimen/activity_margin"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:padding="@dimen/medium_margin"
            android:src="@drawable/ic_cross_vector" />

        <include
            android:id="@+id/dialpad_include"
            layout="@layout/dialpad" />

    </RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
