aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity/src/main/kotlin')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
index 800a355..25f94c5 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
@@ -28,7 +28,9 @@ import ca.allanwang.kau.kpref.activity.items.KPrefItemCore
import ca.allanwang.kau.ui.views.RippleCanvas
import ca.allanwang.kau.utils.KAU_LEFT
import ca.allanwang.kau.utils.KAU_RIGHT
+import ca.allanwang.kau.utils.contentView
import ca.allanwang.kau.utils.resolveColor
+import ca.allanwang.kau.utils.setMarginTop
import ca.allanwang.kau.utils.statusBarColor
import ca.allanwang.kau.utils.withLinearAdapter
import com.mikepenz.fastadapter.adapters.FastItemAdapter
@@ -83,6 +85,10 @@ abstract class KPrefActivity : KauBaseActivity(), KPrefActivityContract {
toolbar.setNavigationOnClickListener { onBackPressed() }
setDisplayShowTitleEnabled(false)
}
+ findViewById<View>(android.R.id.content).setOnApplyWindowInsetsListener { _, insets ->
+ kau_toolbar.setMarginTop(insets.systemWindowInsetTop)
+ insets
+ }
window.decorView.systemUiVisibility =
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
statusBarColor = 0x30000000