Handle bottom navbar padding when drawing edge to edge

This commit is contained in:
arkon
2020-11-22 22:48:38 -05:00
parent 1d7c692e89
commit 0f805cd45e
8 changed files with 62 additions and 1 deletions
@@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.ui.base.controller
import android.content.pm.PackageManager.PERMISSION_GRANTED
import android.os.Build
import android.view.WindowInsets
import androidx.core.content.ContextCompat
import com.bluelinelabs.conductor.Controller
import com.bluelinelabs.conductor.Router
@@ -32,3 +33,10 @@ fun Controller.withFadeTransaction(): RouterTransaction {
.pushChangeHandler(OneWayFadeChangeHandler())
.popChangeHandler(OneWayFadeChangeHandler())
}
val Controller.insets: WindowInsets?
get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
activity!!.window.decorView.rootWindowInsets
} else {
null
}