diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2efdfb2d..80180014 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -101,7 +101,8 @@
+ android:permission="com.stevesoltys.seedvault.OPEN_SETTINGS"
+ android:windowSoftInputMode="adjustResize" />
+ android:label="@string/recovery_code_title"
+ android:windowSoftInputMode="adjustResize" />
- val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
- v.setPadding(insets.left, insets.top, insets.right, insets.bottom)
- WindowInsetsCompat.CONSUMED
- }
-}
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/BackupActivity.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/BackupActivity.kt
index 29e48148..286c1167 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/BackupActivity.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/BackupActivity.kt
@@ -11,7 +11,6 @@ import androidx.annotation.CallSuper
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import com.stevesoltys.seedvault.R
-import com.stevesoltys.seedvault.extensions.setupEdgeToEdge
abstract class BackupActivity : AppCompatActivity() {
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/UiUtils.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/UiUtils.kt
index 2e6578d5..e3da09fa 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/UiUtils.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/UiUtils.kt
@@ -8,8 +8,25 @@ package com.stevesoltys.seedvault.ui
import android.content.Context
import android.text.format.DateUtils.MINUTE_IN_MILLIS
import android.text.format.DateUtils.getRelativeTimeSpanString
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener
+import androidx.core.view.WindowCompat.setDecorFitsSystemWindows
+import androidx.core.view.WindowInsetsCompat.CONSUMED
+import androidx.core.view.WindowInsetsCompat.Type.displayCutout
+import androidx.core.view.WindowInsetsCompat.Type.ime
+import androidx.core.view.WindowInsetsCompat.Type.systemBars
import com.stevesoltys.seedvault.R
+fun AppCompatActivity.setupEdgeToEdge() {
+ val rootView = window.decorView.rootView
+ setDecorFitsSystemWindows(window, false)
+ setOnApplyWindowInsetsListener(rootView) { v, windowInsets ->
+ val insets = windowInsets.getInsets(systemBars() or ime() or displayCutout())
+ v.setPadding(insets.left, insets.top, insets.right, insets.bottom)
+ CONSUMED
+ }
+}
+
fun Long.toRelativeTime(context: Context): CharSequence {
return if (this == 0L || this == -1L) {
context.getString(R.string.settings_backup_last_backup_never)
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/PermissionGrantActivity.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/PermissionGrantActivity.kt
index f19f7101..75d20910 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/PermissionGrantActivity.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/PermissionGrantActivity.kt
@@ -8,7 +8,7 @@ package com.stevesoltys.seedvault.ui.storage
import android.content.Intent.FLAG_GRANT_PREFIX_URI_PERMISSION
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
-import com.stevesoltys.seedvault.extensions.setupEdgeToEdge
+import com.stevesoltys.seedvault.ui.setupEdgeToEdge
class PermissionGrantActivity : AppCompatActivity() {