aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt13
1 files changed, 6 insertions, 7 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 4324fd3..3e1596f 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
@@ -59,13 +59,12 @@ abstract class KPrefActivity : KauBaseActivity(), KPrefActivityContract {
//setup layout
setContentView(R.layout.kau_pref_activity)
setSupportActionBar(toolbar)
- if (supportActionBar != null)
- with(supportActionBar!!) {
- setDisplayHomeAsUpEnabled(true)
- setDisplayShowHomeEnabled(true)
- toolbar.setNavigationOnClickListener { onBackPressed() }
- setDisplayShowTitleEnabled(false)
- }
+ supportActionBar?.apply {
+ setDisplayHomeAsUpEnabled(true)
+ setDisplayShowHomeEnabled(true)
+ toolbar.setNavigationOnClickListener { onBackPressed() }
+ setDisplayShowTitleEnabled(false)
+ }
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
statusBarColor = 0x30000000
toolbarCanvas.set(resolveColor(R.attr.colorPrimary))