From 8870ccb18c890b6ce05a16c1be90a1ce2a76ef8d Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 22 May 2021 17:57:58 -0400 Subject: [PATCH] Fix action toolbar positioning (fixes #5099) --- app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 589faac51..12189fb15 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -13,7 +13,6 @@ import androidx.core.view.ViewCompat import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.isVisible -import androidx.core.view.marginTop import androidx.core.view.updateLayoutParams import androidx.lifecycle.lifecycleScope import androidx.preference.PreferenceDialogController @@ -490,7 +489,7 @@ class MainActivity : BaseViewBindingActivity() { fun fixViewToBottom(view: View) { val listener = AppBarLayout.OnOffsetChangedListener { appBarLayout, verticalOffset -> val maxAbsOffset = appBarLayout.measuredHeight - binding.tabs.measuredHeight - view.translationY = -maxAbsOffset - verticalOffset.toFloat() + appBarLayout.marginTop + view.translationY = -maxAbsOffset - verticalOffset.toFloat() + appBarLayout.paddingTop } binding.appbar.addOnOffsetChangedListener(listener) fixedViewsToBottom[view] = listener