do the top margin changing at transparent navigation only
This commit is contained in:
parent
73dd7a9ab2
commit
d41abd229b
1 changed files with 5 additions and 7 deletions
|
@ -215,18 +215,16 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun handleNavigationAndScrolling() {
|
||||
if (portrait) {
|
||||
if (useTransparentNavigation) {
|
||||
if (useTransparentNavigation) {
|
||||
if (portrait) {
|
||||
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility.addBit(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
|
||||
nestedView?.setPadding(0, 0, 0, navigationBarHeight)
|
||||
}
|
||||
(mainCoordinatorLayout?.layoutParams as? FrameLayout.LayoutParams)?.topMargin = statusBarHeight
|
||||
} else {
|
||||
if (useTransparentNavigation) {
|
||||
(mainCoordinatorLayout?.layoutParams as? FrameLayout.LayoutParams)?.topMargin = statusBarHeight
|
||||
} else {
|
||||
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility.removeBit(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
|
||||
nestedView?.setPadding(0, 0, 0, 0)
|
||||
(mainCoordinatorLayout?.layoutParams as? FrameLayout.LayoutParams)?.topMargin = 0
|
||||
}
|
||||
(mainCoordinatorLayout?.layoutParams as? FrameLayout.LayoutParams)?.topMargin = 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue