Funny enough. Sorta similar to the above since I'm...
# compose-android
c
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
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)
        )
    }
}
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)
        )
    }
}
g
you may need to remember the interaction source?
Copy code
interactionSource = remember { MutableInteractionSource() }
c
That didn't work unfortunately.
Actually, I re-deployed and now it worked.
lol.
thanks!