Using nav rail only for landscape (phone + tablet)

Tablet layout will extend the toolbar past the nav rail
Phone layout will contain the toolbar inside the controller's bounds and is collaspable
This commit is contained in:
Jays2Kings 2021-07-10 13:41:21 -04:00
parent 29eec83389
commit 1dac7c1ed2
8 changed files with 399 additions and 20 deletions

View File

@ -3,11 +3,11 @@ package eu.kanade.tachiyomi.ui.base.controller
import android.animation.Animator import android.animation.Animator
import android.animation.AnimatorSet import android.animation.AnimatorSet
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.content.res.Configuration
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.bluelinelabs.conductor.ControllerChangeHandler import com.bluelinelabs.conductor.ControllerChangeHandler
import com.bluelinelabs.conductor.changehandler.FadeChangeHandler import com.bluelinelabs.conductor.changehandler.FadeChangeHandler
import eu.kanade.tachiyomi.util.system.isTablet
/** /**
* A variation of [FadeChangeHandler] that only fades in. * A variation of [FadeChangeHandler] that only fades in.
@ -34,8 +34,9 @@ class OneWayFadeChangeHandler : FadeChangeHandler {
animator.play(ObjectAnimator.ofFloat(to, View.ALPHA, start, 1f)) animator.play(ObjectAnimator.ofFloat(to, View.ALPHA, start, 1f))
} }
val hasSideNav = container.context.resources.configuration?.orientation == Configuration.ORIENTATION_LANDSCAPE
if (from != null && (!isPush || removesFromViewOnPush())) { if (from != null && (!isPush || removesFromViewOnPush())) {
if (!container.context.isTablet()) { if (!hasSideNav) {
animator.play(ObjectAnimator.ofFloat(from, View.ALPHA, 0f)) animator.play(ObjectAnimator.ofFloat(from, View.ALPHA, 0f))
} else { } else {
container.removeView(from) container.removeView(from)

View File

@ -82,7 +82,6 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.ui.source.global_search.GlobalSearchController import eu.kanade.tachiyomi.ui.source.global_search.GlobalSearchController
import eu.kanade.tachiyomi.util.moveCategories import eu.kanade.tachiyomi.util.moveCategories
import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.getBottomGestureInsets
import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.isImeVisible import eu.kanade.tachiyomi.util.system.isImeVisible
import eu.kanade.tachiyomi.util.system.launchUI import eu.kanade.tachiyomi.util.system.launchUI
@ -308,13 +307,13 @@ class LibraryController(
binding.filterBottomSheet.filterBottomSheet.updatePaddingRelative( binding.filterBottomSheet.filterBottomSheet.updatePaddingRelative(
bottom = max( bottom = max(
(-pad).toInt(), (-pad).toInt(),
view?.rootWindowInsets?.getBottomGestureInsets() ?: 0 view?.rootWindowInsets?.systemWindowInsetBottom ?: 0
) )
) )
val padding = max( val padding = max(
(-pad).toInt(), (-pad).toInt(),
view?.rootWindowInsets?.getBottomGestureInsets() ?: 0 view?.rootWindowInsets?.systemWindowInsetBottom ?: 0
) )
binding.filterBottomSheet.filterBottomSheet.sheetBehavior?.peekHeight = 60.dpToPx + padding binding.filterBottomSheet.filterBottomSheet.sheetBehavior?.peekHeight = 60.dpToPx + padding
updateHopperY() updateHopperY()
@ -323,7 +322,7 @@ class LibraryController(
} }
} else { } else {
binding.filterBottomSheet.filterBottomSheet.updatePaddingRelative( binding.filterBottomSheet.filterBottomSheet.updatePaddingRelative(
bottom = view?.rootWindowInsets?.getBottomGestureInsets() ?: 0 bottom = view?.rootWindowInsets?.systemWindowInsetBottom ?: 0
) )
updateHopperY() updateHopperY()
} }

View File

@ -73,7 +73,6 @@ import eu.kanade.tachiyomi.util.system.contextCompatDrawable
import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.hasSideNavBar import eu.kanade.tachiyomi.util.system.hasSideNavBar
import eu.kanade.tachiyomi.util.system.isBottomTappable import eu.kanade.tachiyomi.util.system.isBottomTappable
import eu.kanade.tachiyomi.util.system.isTablet
import eu.kanade.tachiyomi.util.system.launchUI import eu.kanade.tachiyomi.util.system.launchUI
import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets
@ -237,6 +236,10 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
left = insets.systemWindowInsetLeft, left = insets.systemWindowInsetLeft,
right = insets.systemWindowInsetRight right = insets.systemWindowInsetRight
) )
binding.sideNav?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = insets.systemWindowInsetTop
topMargin = insets.systemWindowInsetBottom
}
binding.bottomView?.isVisible = insets.systemWindowInsetBottom > 0 binding.bottomView?.isVisible = insets.systemWindowInsetBottom > 0
binding.bottomView?.updateLayoutParams<ViewGroup.LayoutParams> { binding.bottomView?.updateLayoutParams<ViewGroup.LayoutParams> {
height = insets.systemWindowInsetBottom height = insets.systemWindowInsetBottom
@ -793,7 +796,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
drawerArrow?.progress = 1f drawerArrow?.progress = 1f
nav.visibility = if (!hideBottomNav) View.VISIBLE else nav.visibility nav.visibility = if (!hideBottomNav) View.VISIBLE else nav.visibility
if (isTablet()) { if (nav == binding.sideNav) {
nav.isVisible = !hideBottomNav nav.isVisible = !hideBottomNav
nav.alpha = 1f nav.alpha = 1f
} else { } else {

View File

@ -8,11 +8,11 @@ import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.asImmediateFlow import eu.kanade.tachiyomi.data.preference.asImmediateFlow
import eu.kanade.tachiyomi.data.preference.asImmediateFlowIn import eu.kanade.tachiyomi.data.preference.asImmediateFlowIn
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.util.system.LocaleHelper import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.util.system.appDelegateNightMode import eu.kanade.tachiyomi.util.system.appDelegateNightMode
import eu.kanade.tachiyomi.util.system.getPrefTheme import eu.kanade.tachiyomi.util.system.getPrefTheme
import eu.kanade.tachiyomi.util.system.isInNightMode import eu.kanade.tachiyomi.util.system.isInNightMode
import eu.kanade.tachiyomi.util.system.isTablet
import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.launchIn
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
@ -88,7 +88,7 @@ class SettingsGeneralController : SettingsController() {
) )
entryRange = 0..2 entryRange = 0..2
defaultValue = 0 defaultValue = 0
isVisible = activity?.isTablet() == true isVisible = (activity as? MainActivity)?.binding?.sideNav != null
} }
preferenceCategory { preferenceCategory {

View File

@ -5,6 +5,7 @@ import android.animation.ValueAnimator
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.content.res.Configuration
import android.os.Build import android.os.Build
import android.os.Environment import android.os.Environment
import android.provider.Settings import android.provider.Settings
@ -39,7 +40,6 @@ import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.isTablet import eu.kanade.tachiyomi.util.system.isTablet
import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.system.toast
import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.injectLazy
import kotlin.math.abs import kotlin.math.abs
import kotlin.random.Random import kotlin.random.Random
@ -186,8 +186,8 @@ fun Controller.scrollViewWith(
val tabBarHeight = 48.dpToPx val tabBarHeight = 48.dpToPx
activityBinding?.appBar?.y = 0f activityBinding?.appBar?.y = 0f
activityBinding?.tabsFrameLayout?.elevation = 0f activityBinding?.tabsFrameLayout?.elevation = 0f
val isTabletWithTabs = recycler.context.isTablet() && includeTabView val isSideNavWithTabs = activityBinding?.sideNav != null && includeTabView && recycler.context.isTablet()
activityBinding?.tabShadow?.isVisible = isTabletWithTabs activityBinding?.tabShadow?.isVisible = isSideNavWithTabs
val attrsArray = intArrayOf(R.attr.actionBarSize) val attrsArray = intArrayOf(R.attr.actionBarSize)
val array = recycler.context.obtainStyledAttributes(attrsArray) val array = recycler.context.obtainStyledAttributes(attrsArray)
var appBarHeight = ( var appBarHeight = (
@ -243,13 +243,13 @@ fun Controller.scrollViewWith(
liftOnScroll.invoke(el) liftOnScroll.invoke(el)
} else { } else {
elevationAnim?.cancel() elevationAnim?.cancel()
if (isTabletWithTabs && el) { if (isSideNavWithTabs && el) {
activityBinding?.tabShadow?.isVisible = true activityBinding?.tabShadow?.isVisible = true
} }
val floatingBar = val floatingBar =
(this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView (this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView
if (floatingBar) { if (floatingBar) {
if (isTabletWithTabs) { if (isSideNavWithTabs) {
activityBinding?.tabShadow?.alpha = 0f activityBinding?.tabShadow?.alpha = 0f
} else { } else {
activityBinding?.appBar?.elevation = 0f activityBinding?.appBar?.elevation = 0f
@ -257,7 +257,7 @@ fun Controller.scrollViewWith(
return@f return@f
} }
elevationAnim = ValueAnimator.ofFloat( elevationAnim = ValueAnimator.ofFloat(
if (isTabletWithTabs) { if (isSideNavWithTabs) {
(activityBinding?.tabShadow?.alpha ?: 0f) * 100 (activityBinding?.tabShadow?.alpha ?: 0f) * 100
} else { } else {
activityBinding?.appBar?.elevation ?: 0f activityBinding?.appBar?.elevation ?: 0f
@ -265,7 +265,7 @@ fun Controller.scrollViewWith(
if (el) 15f else 0f if (el) 15f else 0f
) )
elevationAnim?.addUpdateListener { valueAnimator -> elevationAnim?.addUpdateListener { valueAnimator ->
if (isTabletWithTabs) { if (isSideNavWithTabs) {
activityBinding?.tabShadow?.alpha = valueAnimator.animatedValue as Float / 100 activityBinding?.tabShadow?.alpha = valueAnimator.animatedValue as Float / 100
} else { } else {
activityBinding?.appBar?.elevation = valueAnimator.animatedValue as Float activityBinding?.appBar?.elevation = valueAnimator.animatedValue as Float
@ -287,7 +287,7 @@ fun Controller.scrollViewWith(
super.onChangeStart(controller, changeHandler, changeType) super.onChangeStart(controller, changeHandler, changeType)
isInView = changeType.isEnter isInView = changeType.isEnter
if (changeType.isEnter) { if (changeType.isEnter) {
activityBinding?.tabShadow?.isVisible = isTabletWithTabs activityBinding?.tabShadow?.isVisible = isSideNavWithTabs
elevateFunc(elevate) elevateFunc(elevate)
if (fakeToolbarView?.parent != null) { if (fakeToolbarView?.parent != null) {
val parent = fakeToolbarView?.parent as? ViewGroup ?: return val parent = fakeToolbarView?.parent as? ViewGroup ?: return
@ -353,7 +353,7 @@ fun Controller.scrollViewWith(
recycler.post { recycler.post {
elevateFunc(recycler.canScrollVertically(-1)) elevateFunc(recycler.canScrollVertically(-1))
} }
val isTablet = recycler.context.isTablet() val isTablet = recycler.context.isTablet() && recycler.context.resources.configuration?.orientation == Configuration.ORIENTATION_LANDSCAPE
recycler.addOnScrollListener( recycler.addOnScrollListener(
object : RecyclerView.OnScrollListener() { object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {

View File

@ -0,0 +1,183 @@
<?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="0dp"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@id/side_nav"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
</com.bluelinelabs.conductor.ChangeHandlerFrameLayout>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorSecondary"
android:stateListAnimator="@null"
android:theme="?attr/actionBarTheme"
app:layout_constraintStart_toEndOf="@id/side_nav"
app:layout_constraintEnd_toEndOf="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="?attr/actionBarSize"
app:collapseIcon="@drawable/ic_arrow_back_24dp"
android:background="?attr/colorSecondary">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/toolbar_title"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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" />
</eu.kanade.tachiyomi.ui.base.CenteredToolbar>
<FrameLayout
android:id="@+id/card_frame"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" >
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_marginTop="4dp"
app:cardBackgroundColor="?colorPrimaryVariant"
android:layout_marginBottom="4dp"
android:layout_marginStart="14dp"
android:layout_marginEnd="14dp"
app:cardCornerRadius="8dp"
android:layout_height="match_parent" >
<eu.kanade.tachiyomi.ui.base.FloatingToolbar
android:id="@+id/card_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.MaterialComponents.Body1"
app:subtitleTextAppearance="@style/TextAppearance.MaterialComponents.Caption"
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="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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>
</androidx.cardview.widget.CardView>
</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>
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.navigationrail.NavigationRailView
android:id="@+id/side_nav"
style="@style/Widget.MaterialComponents.NavigationRailView.Colored"
android:background="?android:colorBackground"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:itemIconTint="@color/bottom_nav_item_selector"
app:itemRippleColor="@color/ripple_nav"
app:itemTextColor="@color/bottom_nav_item_selector"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menuGravity="center"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/bottom_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -48,7 +48,8 @@
android:layout_width="6dp" android:layout_width="6dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:alpha="0.13" android:alpha="0.04"
android:rotation="180"
android:translationZ="0dp" android:translationZ="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/side_nav" app:layout_constraintEnd_toEndOf="@id/side_nav"

View File

@ -0,0 +1,192 @@
<?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="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
</com.bluelinelabs.conductor.ChangeHandlerFrameLayout>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSecondary"
android:stateListAnimator="@null"
android:theme="?attr/actionBarTheme"
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="?attr/actionBarSize"
app:collapseIcon="@drawable/ic_arrow_back_24dp"
android:background="?attr/colorSecondary">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/toolbar_title"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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" />
</eu.kanade.tachiyomi.ui.base.CenteredToolbar>
<FrameLayout
android:id="@+id/card_frame"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" >
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_marginTop="4dp"
app:cardBackgroundColor="?colorPrimaryVariant"
android:layout_marginBottom="4dp"
android:layout_marginStart="14dp"
android:layout_marginEnd="14dp"
app:cardCornerRadius="8dp"
android:layout_height="match_parent" >
<eu.kanade.tachiyomi.ui.base.FloatingToolbar
android:id="@+id/card_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.MaterialComponents.Body1"
app:subtitleTextAppearance="@style/TextAppearance.MaterialComponents.Caption"
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="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
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>
</androidx.cardview.widget.CardView>
</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>
</com.google.android.material.appbar.AppBarLayout>
<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"
android:background="?colorPrimaryVariant"
app:itemIconTint="@color/bottom_nav_item_selector"
app:itemRippleColor="@color/ripple_nav"
app:itemTextColor="@color/bottom_nav_item_selector"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_navigation"
app:tabRippleColor="@color/rippleColor"
app:tabTextColor="?attr/tabBarIconColor" />
</androidx.constraintlayout.widget.ConstraintLayout>