Customizing tap gestures
Now, the slot has different animations, depending on the state of the tap event, which can be useful if the user has second thoughts about which slot to select. The user may remove their finger from the selected slot, in which case the tap event will follow a different flow of states. You can even determine whether the user should click on the slot for a longer time to make the selection definitive or maybe double-tap the slot just like liking a picture on some social media applications.
To create more complex tap gestures such as these, you need to know that the tap event goes through different states. TouchableWithoutFeedback uses TapGestureHandler under the hood and can go through the following states: UNDETERMINED ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access