Am I doing something wrong or onSelected in Bottom...
# compose
d
Am I doing something wrong or onSelected in BottomNavigationItem is not working? 🤔
Copy code
BottomNavigationItem(
    modifier = Modifier.fillMaxWidth()
            + Modifier.ripple(enabled = false),
    alwaysShowLabels = true,
    icon = { Icon(vectorResource(item.first)) },
    text = { Text(stringResource(item.second)) } },
    selected = selectedItem == item,
    onSelected = {
        println("println statement that is not getting called")
    }
)
l
Does it work if you remove
Modifier.ripple
from there?
d
It does! 😮 Strange
l
I think it's because the
ripple
is intercepting touch events from the
BottomNavigationItem
, so it won't even see the touch events
This won't be a problem in the future, when touch is separated from ripple 🙂