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

    <TextView
        android:id="@+id/titleText"
        android:layout_width="match_parent"
        android:layout_height="@dimen/setting_button_height"
        android:gravity="center_horizontal|center_vertical"
        android:text="@string/dialog_new_message_title"
        android:textColor="?android:textColorPrimary"
        android:textSize="@dimen/very_large_font_size"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/backButton"
        android:background="?selectableItemBackgroundBorderless"
        android:padding="@dimen/small_spacing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/medium_spacing"
        android:clickable="true"
        android:focusable="true"
        android:src="@drawable/ic_arrow_left_24"
        app:layout_constraintBottom_toBottomOf="@id/titleText"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/titleText"
        app:tint="?android:textColorPrimary"
        android:contentDescription="@string/new_conversation_dialog_back_button_content_description" />

    <ImageView
        android:id="@+id/closeButton"
        android:background="?selectableItemBackgroundBorderless"
        android:padding="@dimen/small_spacing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/medium_spacing"
        android:clickable="true"
        android:focusable="true"
        android:src="@drawable/ic_baseline_close_24"
        app:layout_constraintBottom_toBottomOf="@id/titleText"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/titleText"
        android:contentDescription="@string/new_conversation_dialog_close_button_content_description" />

    <com.google.android.material.tabs.TabLayout
        android:id="@+id/tabLayout"
        android:layout_width="match_parent"
        android:layout_height="@dimen/tab_bar_height"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/titleText" />

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tabLayout" />

    <RelativeLayout
        android:id="@+id/loader"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:alpha="0"
        android:background="#A4000000"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/viewPager">

        <com.github.ybq.android.spinkit.SpinKitView
            style="@style/SpinKitView.Large.ThreeBounce"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_marginTop="8dp"
            app:SpinKit_Color="@android:color/white" />

    </RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>