From f4631021058e212242479e6385acc3a825a8d349 Mon Sep 17 00:00:00 2001
From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com>
Date: Sat, 25 Oct 2025 14:46:55 +0530
Subject: [PATCH] feat(android): enable edge-to-edge and set SDK to 36
---
android/app/build.gradle.kts | 4 ++--
.../app/cogwheel/conduit/MainActivity.kt | 11 ++++++++--
.../src/main/res/values-night-v35/styles.xml | 22 -------------------
.../app/src/main/res/values-v35/styles.xml | 22 -------------------
4 files changed, 11 insertions(+), 48 deletions(-)
delete mode 100644 android/app/src/main/res/values-night-v35/styles.xml
delete mode 100644 android/app/src/main/res/values-v35/styles.xml
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
index d37bbe6..9770bb1 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -16,13 +16,13 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "app.cogwheel.conduit"
- compileSdk = flutter.compileSdkVersion
+ compileSdk = 36
ndkVersion = "27.0.12077973"
defaultConfig {
applicationId = "app.cogwheel.conduit"
minSdk = flutter.minSdkVersion
- targetSdk = flutter.targetSdkVersion
+ targetSdk = 36
versionCode = flutter.versionCode
versionName = flutter.versionName
}
diff --git a/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt b/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt
index e6e996f..edecfcf 100644
--- a/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt
+++ b/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt
@@ -5,15 +5,22 @@ import io.flutter.embedding.engine.FlutterEngine
import android.os.Build
import android.os.Bundle
import androidx.core.view.WindowCompat
+import androidx.core.view.WindowInsetsControllerCompat
class MainActivity : FlutterActivity() {
private lateinit var backgroundStreamingHandler: BackgroundStreamingHandler
-
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- // Enable edge-to-edge display (backwards compatible)
+ // Enable edge-to-edge display for all Android versions
+ // This is the official way to enable edge-to-edge that works with Android 15+
WindowCompat.setDecorFitsSystemWindows(window, false)
+
+ // Configure system bar appearance for edge-to-edge
+ val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView)
+ windowInsetsController.isAppearanceLightStatusBars = false
+ windowInsetsController.isAppearanceLightNavigationBars = false
}
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
diff --git a/android/app/src/main/res/values-night-v35/styles.xml b/android/app/src/main/res/values-night-v35/styles.xml
deleted file mode 100644
index 7eaf8dd..0000000
--- a/android/app/src/main/res/values-night-v35/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
diff --git a/android/app/src/main/res/values-v35/styles.xml b/android/app/src/main/res/values-v35/styles.xml
deleted file mode 100644
index db6df00..0000000
--- a/android/app/src/main/res/values-v35/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-