Funny enough. Sorta similar to the above since I'm working with indication for the first time.
Ripple does not run to completion if I change color of my text. If I remove my text color changing, then my ripple runs to completion.
So... how do I get my ripple to complete while changing color?
Code in thread
👀 1
Colton Idle
05/12/2023, 6:23 PM
Doesn't ripple completely
Copy code
@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
Does ripple completely, but doesn't change color
Copy code
@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)
)
}
}