react-native-gesture-handler
react-native-gesture-handler copied to clipboard
Wrap Gesture Handler button with `View` and transform styles
Description
There are many issues with styling buttons provided by Gesture Handler, mostly on Android where the class responsible for button extends ViewGroup
instead of ReactViewGroup
as it changes the behavior of onTouchEvent.
The best solution to those issues is wrapping the button with a View
and styling the outer view instead. This PR attempts to make it happen auto-magically, which should make the buttons look as expected.
The main problem is correctly transforming the provided styles into two separate objects that when applied to two composed views give the same effect as the original styles applied to just one view.
Test plan
For now, made sure that the changes don't break the Example app.