<?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/main_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".activities.MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true"
        android:orientation="vertical">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar_main"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="@style/ToolbarTheme"
            app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" />

        <RelativeLayout
            android:id="@+id/sync_progress_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone"
            tools:visibility="visible">

            <RelativeLayout
                android:id="@+id/sync_progress_feeds_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/colorPrimary"
                android:padding="8dp">

                <TextView
                    android:id="@+id/sync_progress_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_alignParentEnd="true"
                    android:layout_centerInParent="true"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:minLines="1"
                    android:textAlignment="center"
                    android:textColor="@color/colorBackground"
                    tools:text="updating feeds" />

            </RelativeLayout>

            <ProgressBar
                android:id="@+id/sync_progress_bar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="4dp"
                android:layout_below="@id/sync_progress_feeds_layout"
                android:layout_margin="0dp"
                android:max="100" />

        </RelativeLayout>

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

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/items_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scrollbars="vertical"
                tools:itemCount="3"
                tools:listitem="@layout/list_item"
                tools:visibility="visible" />

        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

    </LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true">

        <com.readrops.app.utils.EmptyListView
            android:id="@+id/empty_list_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:visibility="gone"
            app:image="@drawable/ic_rss_feed_grey"
            app:text="@string/no_item" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/add_feed_fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="16dp"
            android:onClick="openAddFeedActivity"
            android:src="@drawable/ic_add_white" />

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>