diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/MainActivity.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/MainActivity.kt index 18bdb5c..df38c92 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/MainActivity.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/MainActivity.kt @@ -7,6 +7,7 @@ import android.content.ServiceConnection import android.content.SharedPreferences import android.graphics.Bitmap import android.net.Uri +import android.os.Build import android.os.Bundle import android.os.IBinder import androidx.activity.ComponentActivity @@ -44,6 +45,7 @@ import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.core.view.WindowCompat @@ -368,6 +370,16 @@ class MainActivity : ComponentActivity() { isAppearanceLightStatusBars = !isDark isAppearanceLightNavigationBars = !isDark } + + if (Build.VERSION.SDK_INT < 23) { + window.statusBarColor = + (if (isDark) Color.Transparent else Color.Black.copy(alpha = 0.2f)).toArgb() + } + + if (Build.VERSION.SDK_INT < 26) { + window.navigationBarColor = + (if (isDark) Color.Transparent else Color.Black.copy(alpha = 0.2f)).toArgb() + } } }