<?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_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.bluelinelabs.conductor.ChangeHandlerFrameLayout
        android:id="@+id/controller_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0">

        <ImageView
            android:id="@+id/back_shadow"
            android:layout_width="6dp"
            android:alpha="0.25"
            android:visibility="gone"
            android:layout_height="match_parent"
            android:src="@drawable/shape_gradient_start_shadow"
            android:importantForAccessibility="no" />
    </com.bluelinelabs.conductor.ChangeHandlerFrameLayout>

    <eu.kanade.tachiyomi.ui.base.ExpandedAppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:stateListAnimator="@null"
        android:elevation="0dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <eu.kanade.tachiyomi.ui.base.CenteredToolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            app:titleTextColor="?actionBarTintColor"
            android:layout_height="?mainActionBarSize"
            android:translationZ="5dp"
            android:outlineProvider="none"
            app:collapseIcon="@drawable/ic_arrow_back_24dp"
            android:background="@android:color/transparent">

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/toolbar_title"
                style="?textAppearanceTitleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:drawableTint="?actionBarTintColor"
                android:ellipsize="end"
                android:layout_gravity="center"
                android:maxLines="1"
                android:textColor="?actionBarTintColor"
                android:textSize="20sp"
                tools:text="Title Text" />
        </eu.kanade.tachiyomi.ui.base.CenteredToolbar>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/big_toolbar"
            android:layout_width="match_parent"
            android:paddingBottom="12dp"
            android:layout_height="wrap_content">

            <FrameLayout
                android:id="@+id/big_icon_layout"
                android:visibility="gone"
                tools:visibility="visible"
                android:layout_width="52dp"
                android:layout_height="0dp"
                app:layout_constraintHeight_min="wrap"
                app:layout_constraintVertical_bias="1.0"
                android:layout_marginStart="16dp"
                app:layout_constraintTop_toTopOf="@id/big_title"
                app:layout_constraintBottom_toBottomOf="@id/big_title"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toStartOf="@id/big_title">
                    <androidx.appcompat.widget.AppCompatImageView
                        android:id="@+id/big_icon"
                        android:layout_width="52dp"
                        android:layout_height="52dp"
                        android:layout_gravity="center"
                        tools:srcCompat="@mipmap/ic_launcher" />
            </FrameLayout>
            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/big_title"
                android:paddingStart="16dp"
                android:paddingEnd="12dp"
                style="?textAppearanceHeadlineLarge"
                android:layout_width="0dp"
                android:maxLines="2"
                android:layout_marginTop="52dp"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_height="wrap_content"
                app:layout_constraintStart_toEndOf="@id/big_icon_layout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:drawableTint="?actionBarTintColor"
                android:ellipsize="end"
                android:layout_gravity="start"
                android:textColor="?actionBarTintColor"
                tools:text="Big Title" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <FrameLayout
            android:id="@+id/card_frame"
            android:layout_width="match_parent"
            android:layout_height="?mainActionBarSize" >

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_view"
                android:layout_width="match_parent"
                android:layout_marginTop="4dp"
                app:cardBackgroundColor="?colorPrimaryVariant"
                android:layout_marginBottom="4dp"
                app:strokeWidth="0dp"
                android:layout_marginStart="10dp"
                android:layout_marginEnd="10dp"
                app:cardCornerRadius="24dp"
                android:layout_height="match_parent" >

                <eu.kanade.tachiyomi.ui.base.FloatingToolbar
                    android:id="@+id/search_toolbar"
                    tools:title="Search Library..."
                    app:contentInsetStartWithNavigation="0dp"
                    app:contentInsetEndWithActions="0dp"
                    app:contentInsetStart="0dp"
                    app:contentInsetEnd="0dp"
                    android:background="@drawable/rect_ripple"
                    app:navigationIconTint="@color/text_color_secondary"
                    app:navigationIcon="@drawable/ic_search_24dp"
                    app:titleTextAppearance="@style/TextAppearance.FloatingTitle"
                    app:subtitleTextAppearance="?textAppearanceBodySmall"
                    app:collapseIcon="@drawable/ic_arrow_back_24dp"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="start|center"
                        android:orientation="horizontal">

                        <ImageView
                            android:id="@+id/card_incog_image"
                            app:tint="?actionBarTintColor"
                            android:layout_gravity="center|start"
                            android:layout_width="28dp"
                            android:layout_height="28dp"
                            android:layout_marginEnd="6dp"
                            android:layout_marginStart="0dp"
                            android:contentDescription="@string/incognito_mode"
                            android:src="@drawable/ic_incognito_circle_24dp"/>

                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="start|center"
                            android:orientation="vertical">
                            <com.google.android.material.textview.MaterialTextView
                                android:id="@+id/card_title"
                                style="?textAppearanceTitleLarge"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:drawableTint="?actionBarTintColor"
                                android:ellipsize="end"
                                android:layout_gravity="center"
                                android:maxLines="1"
                                android:textColor="?actionBarTintColor"
                                android:textSize="20sp"
                                tools:drawableEnd="@drawable/ic_arrow_drop_down_24dp"
                                tools:drawableStart="@drawable/ic_blank_24dp"
                                tools:text="Title Text" />

                            <com.google.android.material.textview.MaterialTextView
                                android:id="@+id/card_subtitle"
                                style="?textAppearanceTitleLarge"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:ellipsize="end"
                                android:layout_gravity="start|center"
                                android:maxLines="1"
                                android:textColor="?actionBarTintColor"
                                android:textSize="12sp"
                                tools:text="Title Text" />
                        </LinearLayout>
                    </LinearLayout>
                </eu.kanade.tachiyomi.ui.base.FloatingToolbar>
            </com.google.android.material.card.MaterialCardView>
        </FrameLayout>

        <FrameLayout
            android:id="@+id/tabs_frame_layout"
            android:clickable="true"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            tools:ignore="KeyboardInaccessibleWidget">
            <com.google.android.material.tabs.TabLayout
                android:id="@+id/main_tabs"
                style="@style/Theme.Widget.Tabs.Highlight"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="6dp"
                android:layout_marginEnd="6dp"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:tabGravity="fill"/>
        </FrameLayout>
    </eu.kanade.tachiyomi.ui.base.ExpandedAppBarLayout>

    <View
        android:id="@+id/bottom_view"
        android:clickable="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_width="match_parent"
        android:visibility="gone"
        android:layout_height="0dp"
        tools:ignore="KeyboardInaccessibleWidget" />

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottom_nav"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:menu="@menu/bottom_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
