diff --git a/app/src/main/java/org/samo_lego/canta/MainActivity.kt b/app/src/main/java/org/samo_lego/canta/MainActivity.kt index ee974ca..ee13a8f 100644 --- a/app/src/main/java/org/samo_lego/canta/MainActivity.kt +++ b/app/src/main/java/org/samo_lego/canta/MainActivity.kt @@ -31,7 +31,6 @@ class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { enableEdgeToEdge() - window.isNavigationBarContrastEnforced = false super.onCreate(savedInstanceState) setContent { diff --git a/app/src/main/java/org/samo_lego/canta/ui/CantaApp.kt b/app/src/main/java/org/samo_lego/canta/ui/CantaApp.kt index 5991d78..d506aec 100644 --- a/app/src/main/java/org/samo_lego/canta/ui/CantaApp.kt +++ b/app/src/main/java/org/samo_lego/canta/ui/CantaApp.kt @@ -10,9 +10,11 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.rememberPagerState @@ -108,7 +110,9 @@ fun CantaApp( AppsType.UNINSTALLED -> MaterialTheme.colorScheme.tertiaryContainer }, shape = RoundedCornerShape(32.dp), - modifier = Modifier.padding(16.dp), + modifier = Modifier + .padding(16.dp) + .navigationBarsPadding(), onClick = { if (selectedAppsType == AppsType.INSTALLED) { showUninstallConfirmDialog = appListViewModel.selectedApps.isNotEmpty() @@ -140,6 +144,7 @@ fun CantaApp( }, floatingActionButtonPosition = FabPosition.End, + contentWindowInsets = WindowInsets(0, 0, 0, 0) ) { innerPadding -> Column( modifier = Modifier diff --git a/app/src/main/java/org/samo_lego/canta/ui/component/AppList.kt b/app/src/main/java/org/samo_lego/canta/ui/component/AppList.kt index 5a997fc..7309537 100644 --- a/app/src/main/java/org/samo_lego/canta/ui/component/AppList.kt +++ b/app/src/main/java/org/samo_lego/canta/ui/component/AppList.kt @@ -5,10 +5,13 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -83,8 +86,8 @@ fun AppList( } if (appList.isNotEmpty()) { LazyColumn( - modifier = Modifier - .fillMaxSize(), + modifier = Modifier.fillMaxSize(), + contentPadding = WindowInsets.navigationBars.asPaddingValues() ) { items(appList, key = { it.packageName }) { appInfo -> AppTile( diff --git a/app/src/main/java/org/samo_lego/canta/ui/theme/Theme.kt b/app/src/main/java/org/samo_lego/canta/ui/theme/Theme.kt index d2a99f7..d5abf46 100644 --- a/app/src/main/java/org/samo_lego/canta/ui/theme/Theme.kt +++ b/app/src/main/java/org/samo_lego/canta/ui/theme/Theme.kt @@ -57,8 +57,7 @@ fun CantaTheme( if (!view.isInEditMode) { SideEffect { val window = (view.context as Activity).window - window.statusBarColor = colorScheme.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme } }