Twelve: SettingsLib: Simplify edge-to-edge configuration
Change-Id: Ib262a7d545905febcd668ee7ca410fd60cea9165
diff --git a/app/src/main/java/org/lineageos/twelve/SettingsActivity.kt b/app/src/main/java/org/lineageos/twelve/SettingsActivity.kt
index 2f1bec9..66962a6 100644
--- a/app/src/main/java/org/lineageos/twelve/SettingsActivity.kt
+++ b/app/src/main/java/org/lineageos/twelve/SettingsActivity.kt
@@ -10,13 +10,13 @@
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
+import androidx.activity.enableEdgeToEdge
import androidx.annotation.CallSuper
import androidx.annotation.Px
import androidx.annotation.XmlRes
import androidx.appcompat.app.AppCompatActivity
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.ViewCompat
-import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import androidx.fragment.app.viewModels
@@ -39,8 +39,8 @@
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- // Setup edge-to-edge
- WindowCompat.setDecorFitsSystemWindows(window, false)
+ // Enable edge-to-edge
+ enableEdgeToEdge()
if (savedInstanceState == null) {
supportFragmentManager
diff --git a/app/src/main/res/values/themes_settingslib.xml b/app/src/main/res/values/themes_settingslib.xml
index 740da76..7c83791 100644
--- a/app/src/main/res/values/themes_settingslib.xml
+++ b/app/src/main/res/values/themes_settingslib.xml
@@ -8,10 +8,7 @@
<style name="Theme.SettingsLib" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:listPreferredItemPaddingLeft">24dp</item>
<item name="android:listPreferredItemPaddingStart">24dp</item>
- <item name="android:navigationBarColor">@android:color/transparent</item>
- <item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:switchStyle">@style/Theme.SettingsLib.Switch</item>
- <item name="android:windowLightStatusBar">?attr/isLightTheme</item>
<item name="alertDialogTheme">@style/Theme.SettingsLib.AlertDialog</item>
<item name="materialAlertDialogTheme">@style/Theme.SettingsLib.AlertDialog</item>
<item name="preferenceTheme">@style/Theme.SettingsLib.PreferenceTheme</item>