From 6e0f450a9ddedd1f03b76f8ad7fe85a7bb8c27d6 Mon Sep 17 00:00:00 2001 From: Mohammadali Rezaei Date: Mon, 11 Dec 2023 04:07:47 -0800 Subject: [PATCH] Change bottom navigation color (#2) Co-authored-by: alirezaeiii --- app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt b/app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt index ed43a85..870db5a 100644 --- a/app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt +++ b/app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt @@ -10,7 +10,6 @@ import androidx.compose.material.BottomNavigation import androidx.compose.material.BottomNavigationItem import androidx.compose.material.ContentAlpha import androidx.compose.material.Icon -import androidx.compose.material.LocalContentColor import androidx.compose.material.MaterialTheme import androidx.compose.material.Scaffold import androidx.compose.material.Text @@ -136,6 +135,7 @@ private fun TMDbBottomBar( tabs.forEach { section -> val selected = section == currentSection BottomNavigationItem( + modifier = Modifier.background(MaterialTheme.colors.background), label = { Text(text = stringResource(id = section.title)) }, @@ -146,7 +146,8 @@ private fun TMDbBottomBar( ) }, selected = selected, - unselectedContentColor = LocalContentColor.current.copy(alpha = ContentAlpha.disabled), + unselectedContentColor = MaterialTheme.colors.onBackground.copy(alpha = ContentAlpha.disabled), + selectedContentColor = MaterialTheme.colors.onBackground, onClick = { navigateToRoute(section.route) } ) }