If I swipe a `Button` (Material 2 or 3) I get a ri...
# compose
r
If I swipe a
Button
(Material 2 or 3) I get a ripple but no
onClick
-- is that working as designed? (Unfortunately, button presses from my thumb when working one-handed tend to be swipes. )
z
I think that is expected. Are these presses recognized as clicks with android views? Compose should be using the same touch slop as framework views.
r
I don't have my own code that uses Views but I just tried out some Buttons (or what I assume are Buttons) in several Google apps on my phone. Calculator and Clock do the same thing (swipe with ripple and no action) but Podcasts, Maps, and Play do not (swipe with ripple and action). (I don't know if any of those use Compose Buttons.)
a
It depends on whether the position you lift your finger is within the bounds of the button. This behavior is consistent between the view system and compose ui.
r
Thanks. I can see that behavior clearly in Compose when I make a big test Button.  If that’s standard Android behavior I won’t concern myself, although it takes getting used to. (For small, e.g. 48.dp buttons, the “ripple no action” happens fairly often, unless presses are slower and more deliberate.)