mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
Fix none tappable screen on devices without a nav bar
This commit is contained in:
parent
fccd3a0ddb
commit
ee38d8a647
@ -66,6 +66,7 @@ import eu.kanade.tachiyomi.util.system.isBottomTappable
|
||||
import eu.kanade.tachiyomi.util.system.launchUI
|
||||
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets
|
||||
import eu.kanade.tachiyomi.util.view.getItemView
|
||||
import eu.kanade.tachiyomi.util.view.gone
|
||||
import eu.kanade.tachiyomi.util.view.snack
|
||||
import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
import eu.kanade.tachiyomi.util.view.updatePadding
|
||||
@ -220,23 +221,14 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
||||
supportActionBar?.setDisplayShowCustomEnabled(true)
|
||||
|
||||
setNavBarColor(content.rootWindowInsets)
|
||||
bottom_view.gone()
|
||||
content.doOnApplyWindowInsets { v, insets, _ ->
|
||||
setNavBarColor(insets)
|
||||
val contextView = window?.decorView?.findViewById<View>(R.id.action_mode_bar)
|
||||
contextView?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
leftMargin = insets.systemWindowInsetLeft
|
||||
rightMargin = insets.systemWindowInsetRight
|
||||
}
|
||||
// Consume any horizontal insets and pad all content in. There's not much we can do
|
||||
// with horizontal insets
|
||||
v.updatePadding(
|
||||
left = insets.systemWindowInsetLeft,
|
||||
right = insets.systemWindowInsetRight
|
||||
)
|
||||
appbar.updatePadding(
|
||||
top = insets.systemWindowInsetTop
|
||||
)
|
||||
bottom_nav.updatePadding(bottom = insets.systemWindowInsetBottom)
|
||||
bottom_view.visibleIf(insets.systemWindowInsetBottom > 0)
|
||||
bottom_view.updateLayoutParams<ViewGroup.LayoutParams> {
|
||||
height = insets.systemWindowInsetBottom
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user