mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-25 02:02:04 +01:00
Fix app for landscape phones with 3 button nav
This commit is contained in:
parent
46374e0582
commit
0c41a3cd96
@ -224,6 +224,17 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
|||||||
bottom_view.gone()
|
bottom_view.gone()
|
||||||
content.doOnApplyWindowInsets { v, insets, _ ->
|
content.doOnApplyWindowInsets { v, insets, _ ->
|
||||||
setNavBarColor(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(
|
appbar.updatePadding(
|
||||||
top = insets.systemWindowInsetTop
|
top = insets.systemWindowInsetTop
|
||||||
)
|
)
|
||||||
|
@ -265,6 +265,10 @@ fun BottomSheetDialog.setEdgeToEdge(
|
|||||||
contentView.post {
|
contentView.post {
|
||||||
(contentView.parent as View).background = null
|
(contentView.parent as View).background = null
|
||||||
}
|
}
|
||||||
|
contentView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
|
leftMargin = insets.systemWindowInsetLeft
|
||||||
|
rightMargin = insets.systemWindowInsetRight
|
||||||
|
}
|
||||||
if (setTopMargin > 0) (contentView.parent as View).updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
if (setTopMargin > 0) (contentView.parent as View).updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
height = activity.window.decorView.height - insets.systemWindowInsetTop - setTopMargin
|
height = activity.window.decorView.height - insets.systemWindowInsetTop - setTopMargin
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user