feat: apply primary color theme to top and bottom navigation bars with white text/icons, update logo asset, bump version to 1.16.3 (build 23)
- Set TopAppBar containerColor to primary with white title, logo, and settings icon - Apply primary containerColor to NavigationBar with white selected items and 70% opacity unselected items - Replace safebite_logo_nobg.png with updated asset, remove old backup file
This commit is contained in:
parent
86af6467cc
commit
18218ab023
@ -30,6 +30,8 @@ import androidx.compose.material3.NavigationBarItemDefaults
|
|||||||
import androidx.compose.material3.Scaffold
|
import androidx.compose.material3.Scaffold
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TopAppBar
|
import androidx.compose.material3.TopAppBar
|
||||||
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@ -97,17 +99,28 @@ fun MainScreen(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
)
|
)
|
||||||
Spacer(Modifier.width(8.dp))
|
Spacer(Modifier.width(8.dp))
|
||||||
Text(stringResource(R.string.app_name))
|
Text(
|
||||||
|
text = stringResource(R.string.app_name),
|
||||||
|
color = Color.White
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions = {
|
actions = {
|
||||||
IconButton(onClick = onOpenSettings) {
|
IconButton(onClick = onOpenSettings) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Filled.Settings,
|
imageVector = Icons.Filled.Settings,
|
||||||
contentDescription = stringResource(R.string.nav_settings)
|
contentDescription = stringResource(R.string.nav_settings),
|
||||||
|
tint = Color.White
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
colors = TopAppBarDefaults.topAppBarColors(
|
||||||
|
containerColor = MaterialTheme.colorScheme.primary,
|
||||||
|
scrolledContainerColor = MaterialTheme.colorScheme.primary,
|
||||||
|
titleContentColor = Color.White,
|
||||||
|
navigationIconContentColor = Color.White,
|
||||||
|
actionIconContentColor = Color.White,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
@ -178,7 +191,7 @@ private fun SafeBiteBottomNavigation(
|
|||||||
items: List<BottomNavItem>
|
items: List<BottomNavItem>
|
||||||
) {
|
) {
|
||||||
NavigationBar(
|
NavigationBar(
|
||||||
containerColor = MaterialTheme.colorScheme.surface,
|
containerColor = MaterialTheme.colorScheme.primary,
|
||||||
tonalElevation = 2.dp
|
tonalElevation = 2.dp
|
||||||
) {
|
) {
|
||||||
items.forEach { item ->
|
items.forEach { item ->
|
||||||
@ -209,11 +222,11 @@ private fun SafeBiteBottomNavigation(
|
|||||||
},
|
},
|
||||||
alwaysShowLabel = true,
|
alwaysShowLabel = true,
|
||||||
colors = androidx.compose.material3.NavigationBarItemDefaults.colors(
|
colors = androidx.compose.material3.NavigationBarItemDefaults.colors(
|
||||||
selectedIconColor = MaterialTheme.colorScheme.onSurface,
|
selectedIconColor = Color.White,
|
||||||
selectedTextColor = MaterialTheme.colorScheme.onSurface,
|
selectedTextColor = Color.White,
|
||||||
unselectedIconColor = MaterialTheme.colorScheme.onSurfaceVariant,
|
unselectedIconColor = Color.White.copy(alpha = 0.7f),
|
||||||
unselectedTextColor = MaterialTheme.colorScheme.onSurfaceVariant,
|
unselectedTextColor = Color.White.copy(alpha = 0.7f),
|
||||||
indicatorColor = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.5f)
|
indicatorColor = Color.White.copy(alpha = 0.2f)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 157 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 240 KiB |
@ -1,4 +1,4 @@
|
|||||||
MAJOR=1
|
MAJOR=1
|
||||||
MINOR=16
|
MINOR=16
|
||||||
PATCH=0
|
PATCH=3
|
||||||
CODE=20
|
CODE=23
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user