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

        <View
            android:id="@+id/popupAnchor"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <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_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

        <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/ibHintSwipe"
            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/bottom_navigation"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSelect" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvFolder"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:scrollbarStyle="outsideOverlay"
            android:scrollbars="vertical"
            app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSelect" />

        <ProgressBar
            android:id="@+id/pbWait"
            style="@style/Base.Widget.AppCompat.ProgressBar"
            android:layout_width="@dimen/normal_size"
            android:layout_height="@dimen/normal_size"
            android:indeterminate="true"
            app:layout_constraintBottom_toBottomOf="parent"
            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="28dp"
            android:background="?attr/colorSeparator"
            app:itemIconTint="@color/bottomnav_background"
            app:itemTextColor="@color/bottomnav_background"
            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/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="rvFolder" />

      </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fabMove"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|center_vertical"
        android:layout_margin="16dp"
        android:src="@drawable/baseline_folder_24"
        android:tint="@color/colorActionForeground"
        app:backgroundTint="?attr/colorSeparator" />

    <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="16dp"
        android:src="@drawable/baseline_edit_24"
        android:tint="@color/colorActionForeground"
        app:backgroundTint="?attr/colorAccent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
