<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
    tools:context=".ActivityView">

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/swipeRefresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/tvSupport"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:padding="6dp"
                android:text="@string/title_pro_support"
                android:textAppearance="@style/TextAppearance.AppCompat.Small"
                android:textColor="?android:attr/textColorPrimary"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <View
                android:id="@+id/vSeparatorSupport"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="?attr/colorSeparator"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tvSupport" />

            <TextView
                android:id="@+id/tvHintSupport"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:minHeight="33dp"
                android:padding="6dp"
                android:text="@string/title_hint_support"
                android:textAppearance="@style/TextAppearance.AppCompat.Small"
                android:textColor="?android:attr/textColorPrimary"
                app:layout_constraintEnd_toStartOf="@+id/ibHintSupport"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorSupport" />

            <ImageButton
                android:id="@+id/ibHintSupport"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/baseline_close_24"
                app:layout_constraintBottom_toBottomOf="@id/tvHintSupport"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvHintSupport" />

            <View
                android:id="@+id/vSeparatorHintSupport"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="?attr/colorSeparator"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/ibHintSupport" />

            <TextView
                android:id="@+id/tvHintSwipe"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:minHeight="33dp"
                android:padding="6dp"
                android:text="@string/title_hint_message_actions"
                android:textAppearance="@style/TextAppearance.AppCompat.Small"
                android:textColor="?android:attr/textColorPrimary"
                app:layout_constraintEnd_toStartOf="@+id/ibHintSwipe"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSupport" />

            <ImageButton
                android:id="@+id/ibHintSwipe"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/baseline_close_24"
                app:layout_constraintBottom_toBottomOf="@id/tvHintSwipe"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvHintSwipe" />

            <View
                android:id="@+id/vSeparatorHintSwipe"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="?attr/colorSeparator"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tvHintSwipe" />

            <TextView
                android:id="@+id/tvHintSelect"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:minHeight="33dp"
                android:padding="6dp"
                android:text="@string/title_hint_message_selection"
                android:textAppearance="@style/TextAppearance.AppCompat.Small"
                android:textColor="?android:attr/textColorPrimary"
                app:layout_constraintEnd_toStartOf="@+id/ibHintSelect"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSwipe" />

            <ImageButton
                android:id="@+id/ibHintSelect"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/baseline_close_24"
                app:layout_constraintBottom_toBottomOf="@id/tvHintSelect"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tvHintSelect" />

            <View
                android:id="@+id/vSeparatorHintSelect"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="?attr/colorSeparator"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/ibHintSelect" />

            <TextView
                android:id="@+id/tvNoEmail"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/title_no_messages"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                app:layout_constraintBottom_toTopOf="@+id/seekBar"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSelect" />

            <eu.faircode.email.FixedRecyclerView
                android:id="@+id/rvMessage"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:scrollbarStyle="outsideOverlay"
                android:scrollbars="vertical"
                app:layout_constraintBottom_toTopOf="@+id/seekBar"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSelect" />

            <eu.faircode.email.ContentLoadingProgressBar
                android:id="@+id/pbWait"
                style="@style/Base.Widget.AppCompat.ProgressBar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:indeterminate="true"
                app:layout_constraintBottom_toTopOf="@+id/seekBar"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSelect" />

            <SeekBar
                android:id="@+id/seekBar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent" />

            <com.google.android.material.bottomnavigation.BottomNavigationView
                android:id="@+id/bottom_navigation"
                android:layout_width="match_parent"
                android:layout_height="36dp"
                android:background="?android:attr/colorPrimary"
                app:itemIconTint="@color/bottomnav_foreground"
                app:itemTextColor="@color/bottomnav_foreground"
                app:labelVisibilityMode="unlabeled"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:menu="@menu/action_messages" />

            <androidx.constraintlayout.widget.Group
                android:id="@+id/grpSupport"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:constraint_referenced_ids="tvSupport,vSeparatorSupport" />

            <androidx.constraintlayout.widget.Group
                android:id="@+id/grpHintSupport"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:constraint_referenced_ids="tvHintSupport,ibHintSupport,vSeparatorHintSupport" />

            <androidx.constraintlayout.widget.Group
                android:id="@+id/grpHintSwipe"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:constraint_referenced_ids="tvHintSwipe,ibHintSwipe,vSeparatorHintSwipe" />

            <androidx.constraintlayout.widget.Group
                android:id="@+id/grpHintSelect"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:constraint_referenced_ids="tvHintSelect,ibHintSelect,vSeparatorHintSelect" />

            <androidx.constraintlayout.widget.Group
                android:id="@+id/grpReady"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:constraint_referenced_ids="rvMessage" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fabMore"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|center_vertical"
        android:layout_margin="@dimen/fab_padding"
        android:src="@drawable/baseline_more_vert_24"
        android:tint="@color/colorActionForeground"
        app:backgroundTint="?attr/colorAccent" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_margin="@dimen/fab_padding"
        android:src="@drawable/baseline_edit_24"
        android:tint="@color/colorActionForeground"
        android:tooltipText="@string/title_compose"
        app:backgroundTint="?attr/colorAccent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
