Skip to content

Commit

Permalink
Bump compose to 1.6.1, compile 1.5.9 (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandregpereira authored Feb 11, 2024
1 parent 0f5e8e0 commit d60b5e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.selection.selectable
import androidx.compose.material.BottomNavigation
Expand Down Expand Up @@ -83,14 +84,15 @@ fun BoxScope.AppBottomNavigation(
.background(MaterialTheme.colors.surface),
elevation = 4.dp
) {
val paddingBottom = contentPadding.calculateBottomPadding()
BottomNavigation(
backgroundColor = MaterialTheme.colors.surface,
elevation = 0.dp,
modifier = Modifier.padding(bottom = contentPadding.calculateBottomPadding())
modifier = Modifier.height(56.dp + paddingBottom).padding(bottom = paddingBottom)
) {
BottomBarItem.values().forEach { bottomBarItem ->
BottomBarItem.entries.forEach { bottomBarItem ->
AppBottomNavigationItem(
totalItems = BottomBarItem.values().size,
totalItems = BottomBarItem.entries.size,
indexSelected = bottomBarItemSelected.ordinal,
currentIndex = bottomBarItem.ordinal,
iconRes = bottomBarItem.iconRes,
Expand Down Expand Up @@ -192,7 +194,7 @@ private fun BottomNavigationTransition(
content: @Composable (animationProgress: Float) -> Unit
) {
val animationProgress by animateFloatAsState(
targetValue = if (selected) 1f else 0f,
targetValue = if (selected) 1f else 0f, label = "BottomNavigationTransition",
)

val color = lerp(inactiveColor, activeColor, animationProgress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun MainScreen(
) {
Box {
val bottomBarNavigationSize by animateDpAsState(
targetValue = if (state.showBottomBar) 56.dp else 0.dp
targetValue = if (state.showBottomBar) 56.dp else 0.dp, label = "bottomBarNavigationSize"
)
val contentPaddingWithBottomBar = PaddingValues(
top = contentPadding.calculateTopPadding(),
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ appcompat = "1.6.1"
arch_core_testing = "2.2.0"
coil_compose = "2.5.0"
compose_activity = '1.8.2'
compose = '1.5.4'
compose_material = '1.5.4'
compose_compiler = '1.5.8'
compose = '1.6.1'
compose_material = '1.6.1'
compose_compiler = '1.5.9'
core_ktx = '1.12.0'
espresso_core = "3.5.1"
firebase_bom = "32.7.0"
Expand Down

0 comments on commit d60b5e9

Please sign in to comment.