mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 11:31:54 +01:00
Fixed sidenav's padding
since google doesn't know how to
This commit is contained in:
parent
e0e6ffb6d8
commit
72a74ea488
@ -28,6 +28,7 @@ import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.ColorUtils
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.GestureDetectorCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.bluelinelabs.conductor.Conductor
|
||||
@ -233,18 +234,18 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
||||
)
|
||||
binding.bottomNav?.updatePadding(bottom = insets.systemWindowInsetBottom)
|
||||
binding.sideNav?.updatePadding(
|
||||
left = insets.systemWindowInsetLeft,
|
||||
right = insets.systemWindowInsetRight
|
||||
left = 0,
|
||||
right = 0,
|
||||
bottom = insets.systemWindowInsetBottom,
|
||||
top = insets.systemWindowInsetTop
|
||||
)
|
||||
binding.sideNav?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
topMargin = insets.systemWindowInsetTop
|
||||
topMargin = insets.systemWindowInsetBottom
|
||||
}
|
||||
binding.bottomView?.isVisible = insets.systemWindowInsetBottom > 0
|
||||
binding.bottomView?.updateLayoutParams<ViewGroup.LayoutParams> {
|
||||
height = insets.systemWindowInsetBottom
|
||||
}
|
||||
}
|
||||
// Set this as nav view will try to set its own insets and they're hilariously bad
|
||||
ViewCompat.setOnApplyWindowInsetsListener(nav) { _, insets -> insets }
|
||||
|
||||
router = Conductor.attachRouter(this, container, savedInstanceState)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user