How to listen for two simultaneous touch events in React Native?

Viewed 348

Our goal is to have two button-like views in our React Native game. They will each consist of a View wrapping around some animated image or alike. The views should be touchable at the same time.

This means: We want to trigger some action on the onTouchStart (like add a symbol to a text) and change the state of the view while it is pressed (for example to change the image in the background or something like that).

Using onTouchStart did not work, since on Android (and only there) we had a Problem: When keeping the first button pressed, pressing the second button with a second finger caused the first callback to trigger, not the second one.

How should we implement this correctly without messing with native code?

0 Answers
Related