<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ This file is part of FYReader.
  ~  FYReader is free software: you can redistribute it and/or modify
  ~  it under the terms of the GNU General Public License as published by
  ~  the Free Software Foundation, either version 3 of the License, or
  ~  (at your option) any later version.
  ~
  ~  FYReader is distributed in the hope that it will be useful,
  ~  but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~  GNU General Public License for more details.
  ~
  ~  You should have received a copy of the GNU General Public License
  ~  along with FYReader.  If not, see <https://www.gnu.org/licenses/>.
  ~
  ~  Copyright (C) 2020 - 2022 fengyuecanzhu
  -->

<androidx.constraintlayout.widget.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            app:layout_constraintTop_toTopOf="parent">

        <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                style="@style/NoPaddingToolbar"
                android:layout_width="match_parent"
                android:layout_height="45dp"
                android:background="?attr/colorPrimary"
                android:minHeight="?attr/actionBarSize"
                android:gravity="center_vertical"
                android:theme="?attr/actionBarStyle"
                android:transitionName="sharedView"
                app:layout_scrollFlags="scroll|enterAlways"
                app:titleTextAppearance="@style/toolbar_title_textStyle"
                app:subtitleTextAppearance="@style/toolbar_subtitle_textStyle"
                app:popupTheme="@style/AppTheme.PopupOverlay">

            <com.google.android.material.tabs.TabLayout
                    android:id="@+id/bookcase_tab"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="9"
                    android:visibility="gone"
                    app:tabIndicatorColor="@color/colorAccent"
                    app:tabIndicatorHeight="2dp"
                    app:tabIndicatorFullWidth="true"
                    app:tabSelectedTextColor="@color/textPrimaryInverted"
                    app:tabTextColor="@color/translucent_text"
                    app:tabTextAppearance="@style/TabLayoutTextStyle"/>
        </androidx.appcompat.widget.Toolbar>

    </com.google.android.material.appbar.AppBarLayout>

    <xyz.fycz.myreader.widget.NoScrollViewPager
            android:id="@+id/view_pager_main"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view"
            app:layout_constraintTop_toBottomOf="@id/app_bar"/>

    <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottom_navigation_view"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:elevation="10dp"
            android:background="@color/colorForeground"
            app:labelVisibilityMode="unlabeled"
            app:itemIconTint="@color/selector_bn"
            app:menu="@menu/main_bnv"
            app:layout_constraintBottom_toBottomOf="parent"/>


</androidx.constraintlayout.widget.ConstraintLayout>