Skip to content

Commit

Permalink
Change bottom navigation color (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: alirezaeiii <ali.rezaei09@gmail.com>
  • Loading branch information
Mohammadali Rezaei authored Dec 11, 2023
1 parent cfc8964 commit 6e0f450
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/com/sample/tmdb/ui/TMDbApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
},
Expand All @@ -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) }
)
}
Expand Down

0 comments on commit 6e0f450

Please sign in to comment.