diff --git a/app/src/main/java/com/bnyro/clock/ui/AlarmActivity.kt b/app/src/main/java/com/bnyro/clock/ui/AlarmActivity.kt index 3c7bfdcb..491de74f 100644 --- a/app/src/main/java/com/bnyro/clock/ui/AlarmActivity.kt +++ b/app/src/main/java/com/bnyro/clock/ui/AlarmActivity.kt @@ -7,6 +7,7 @@ import android.view.Window import android.view.WindowManager import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue @@ -24,7 +25,7 @@ class AlarmActivity : ComponentActivity() { requestWindowFeature(Window.FEATURE_NO_TITLE) window.addFlags(windowFlags) - + enableEdgeToEdge() setContent { AlarmAlertScreen( onDismiss = this@AlarmActivity::dismiss, diff --git a/app/src/main/java/com/bnyro/clock/ui/MainActivity.kt b/app/src/main/java/com/bnyro/clock/ui/MainActivity.kt index b7213d7b..0a93d4eb 100644 --- a/app/src/main/java/com/bnyro/clock/ui/MainActivity.kt +++ b/app/src/main/java/com/bnyro/clock/ui/MainActivity.kt @@ -12,6 +12,7 @@ import android.os.IBinder import android.provider.AlarmClock import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.fillMaxSize @@ -75,6 +76,7 @@ class MainActivity : ComponentActivity() { ) == it.route } } + enableEdgeToEdge() setContent { val settingsModel: SettingsModel = viewModel() diff --git a/app/src/main/java/com/bnyro/clock/ui/theme/Theme.kt b/app/src/main/java/com/bnyro/clock/ui/theme/Theme.kt index 97745782..b3b46ba6 100644 --- a/app/src/main/java/com/bnyro/clock/ui/theme/Theme.kt +++ b/app/src/main/java/com/bnyro/clock/ui/theme/Theme.kt @@ -5,25 +5,15 @@ import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.ColorScheme import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.surfaceColorAtElevation import androidx.compose.runtime.Composable import androidx.compose.runtime.SideEffect import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView -import androidx.compose.ui.unit.dp import androidx.core.view.WindowCompat -val AmoledDarkColorScheme = darkColorScheme( - primary = Color(0xFF6836FF), - background = Color(0xFF000000), - onPrimary = Color(0xFFFFFFFF) -) - @Composable fun ClockYouTheme( darkTheme: Boolean = isSystemInDarkTheme(), @@ -57,9 +47,6 @@ fun ClockYouTheme( SideEffect { val activity = view.context as Activity if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - activity.window.statusBarColor = colorScheme.background.toArgb() - activity.window.navigationBarColor = - colorScheme.surfaceColorAtElevation(5.dp).toArgb() val insetsController = WindowCompat.getInsetsController( activity.window, view