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 e4ac145..fd5fe0f 100644 --- a/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt +++ b/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt @@ -2,10 +2,18 @@ package app.cogwheel.conduit import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.engine.FlutterEngine +import android.os.Bundle +import androidx.core.view.WindowCompat class MainActivity : FlutterActivity() { private lateinit var backgroundStreamingHandler: BackgroundStreamingHandler + override fun onCreate(savedInstanceState: Bundle?) { + // Enable edge-to-edge display for Android 15+ compatibility + WindowCompat.setDecorFitsSystemWindows(window, false) + super.onCreate(savedInstanceState) + } + override fun configureFlutterEngine(flutterEngine: FlutterEngine) { super.configureFlutterEngine(flutterEngine) diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index dbc9ea9..11115bc 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -7,8 +7,11 @@ @drawable/launch_background false false - false + + true shortEdges + @android:color/transparent + @android:color/transparent diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml index a6497f8..2cbe5b7 100644 --- a/android/app/src/main/res/values-v31/styles.xml +++ b/android/app/src/main/res/values-v31/styles.xml @@ -4,9 +4,12 @@ diff --git a/android/app/src/main/res/values-v35/styles.xml b/android/app/src/main/res/values-v35/styles.xml new file mode 100644 index 0000000..85122a2 --- /dev/null +++ b/android/app/src/main/res/values-v35/styles.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 0d1fa8f..2c89051 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -7,8 +7,11 @@ @drawable/launch_background false false - false + + true shortEdges + @android:color/transparent + @android:color/transparent diff --git a/lib/core/services/platform_service.dart b/lib/core/services/platform_service.dart index 42fab57..95529a4 100644 --- a/lib/core/services/platform_service.dart +++ b/lib/core/services/platform_service.dart @@ -312,6 +312,7 @@ class PlatformService { } /// Apply platform-specific status bar styling + /// Updated for Android 15+ edge-to-edge compatibility static void setPlatformStatusBarStyle({ bool isDarkContent = false, Color? backgroundColor, @@ -329,16 +330,20 @@ class PlatformService { ), ); } else { + // For Android 15+, use edge-to-edge approach + // Avoid deprecated setStatusBarColor, setNavigationBarColor, setNavigationBarDividerColor SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle( - statusBarColor: backgroundColor ?? Colors.transparent, + // Only set icon brightness, avoid deprecated color properties statusBarIconBrightness: isDarkContent ? Brightness.dark : Brightness.light, - systemNavigationBarColor: backgroundColor, systemNavigationBarIconBrightness: isDarkContent ? Brightness.dark : Brightness.light, + // Use transparent colors for edge-to-edge + statusBarColor: Colors.transparent, + systemNavigationBarColor: Colors.transparent, ), ); }