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 3a4e1b1da7..55e124b954 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 @@ -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(), 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 { - topMargin = insets.systemWindowInsetTop - topMargin = insets.systemWindowInsetBottom - } binding.bottomView?.isVisible = insets.systemWindowInsetBottom > 0 binding.bottomView?.updateLayoutParams { 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)