mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 23:27:04 +05:30
fix(android): prevent transparent navigation bar on API <= 31
Haze only works on API 32 and above so we set a solid background color for devices without blur.
This commit is contained in:
parent
cf5ebcf712
commit
76dd90a287
1 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,7 @@ import androidx.compose.ui.platform.testTag
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import dev.chrisbanes.haze.HazeDefaults
|
||||
import dev.chrisbanes.haze.HazeState
|
||||
import dev.chrisbanes.haze.HazeStyle
|
||||
import dev.chrisbanes.haze.hazeChild
|
||||
|
@ -80,7 +81,8 @@ fun ClawNavigationBar(
|
|||
noiseFactor = 0f,
|
||||
),
|
||||
),
|
||||
containerColor = Color.Transparent,
|
||||
containerColor =
|
||||
if (HazeDefaults.blurEnabled()) Color.Transparent else MaterialTheme.colorScheme.surface,
|
||||
) {
|
||||
val navBackStackEntry = navController.currentBackStackEntryAsState().value
|
||||
val currentDestination = navBackStackEntry?.destination
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue