Colton Idle
05/12/2023, 6:07 PMColton Idle
05/12/2023, 6:23 PM@Composable
private fun BottomNavItem2(
name: String,
selected: Boolean,
onClick: () -> Unit
) {
Column(
modifier = Modifier.clickable(
indication = rememberRipple(false),
onClick = onClick,
interactionSource = MutableInteractionSource()
),
horizontalAlignment = Alignment.CenterHorizontally
) {
val color =
if (selected) Color.Red else Color.Blue
Text(
text = name,
color = color,
modifier = Modifier.padding(8.dp)
)
}
}
Colton Idle
05/12/2023, 6:24 PM@Composable
private fun BottomNavItem2(
name: String,
selected: Boolean,
onClick: () -> Unit
) {
Column(
modifier = Modifier.clickable(
indication = rememberRipple(false),
onClick = onClick,
interactionSource = MutableInteractionSource()
),
horizontalAlignment = Alignment.CenterHorizontally
) {
val color = Color.Blue
Text(
text = name,
color = color,
modifier = Modifier.padding(8.dp)
)
}
}
Giang
05/12/2023, 7:23 PMinteractionSource = remember { MutableInteractionSource() }
Colton Idle
05/13/2023, 2:16 PMColton Idle
05/13/2023, 2:17 PMColton Idle
05/13/2023, 2:17 PMColton Idle
05/13/2023, 2:17 PM