question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2][Android] Taps on the bottom sheet are not activated

See original GitHub issue

Bug

With my limited knowledge of the entire gesture handler from Software Mansion, it seems that ContentWrapper.android.tsx is configured incorrectly (or something there anyway).

When tapping ‘quickly’ (read a normal tap), the gesture handler responds in the following manner (not sure why duplicated) and doesn’t call the onPress handler (although the UI updates the opacity when pressed on a TouchableOpacity component):

[Thu Nov 26 2020 13:37:02.521]  LOG      start
[Thu Nov 26 2020 13:37:02.524]  LOG     start
[Thu Nov 26 2020 13:37:02.611]   LOG     active
[Thu Nov 26 2020 13:37:02.612]  LOG      active
[Thu Nov 26 2020 13:37:02.615]  LOG      end
[Thu Nov 26 2020 13:37:02.616]  LOG      finish
[Thu Nov 26 2020 13:37:02.620]  LOG     end
[Thu Nov 26 2020 13:37:02.622]  LOG     finish

Changing line 17 to lets say 50, results in the following log (once again not sure why the duplication occurs):

[Thu Nov 26 2020 13:43:44.274]  LOG     start
[Thu Nov 26 2020 13:43:44.276]  LOG     start
[Thu Nov 26 2020 13:43:44.784]  LOG     fail
[Thu Nov 26 2020 13:43:44.785]  LOG     finish
[Thu Nov 26 2020 13:43:44.786]  LOG     fail
[Thu Nov 26 2020 13:43:44.786]  LOG     finish

Currently my code structure looks like this (react-navigation based)

<BottomSheet>
  <BottomSheetView>
    <Header /> // title and close button
    <BottomSheetScrollView>
      {items} // Array with TouchableOpacity items from react-native
    </BottomSheetScrollView>
  </BottomSheetView>
</BottomSheet>

Logs

To reproduce the logs above, I updated useTapGestureHandler to log each of the gesture handler events

Environment info

Library Version
@gorhom/bottom-sheet 2.0.0-alpha.1
react-native 0.63.3
react-native-reanimated 2.0.0-alpha.9.1
react-native-gesture-handler 1.8.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
gorhomcommented, Nov 29, 2020

@Johan-dutoit yeah , i am working on that already 😅

2reactions
gorhomcommented, Nov 26, 2020

thanks @Johan-dutoit for submitting this issue.

could you try to import the TouchableOpacity from the library, also you could look at Touchable

please let me know if it still not working to investigate it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bottom Sheet not working on Kitkat(Pre-lollipop device)
Hi I am able to run bottom sheet on android 5.0 but not on kitkat. Edited The strange thing is that when i...
Read more >
Untitled
Perpendicular triangle of forces, Blindosbarra non ci stare, Easy targets for ... Southend united fc transfer rumours, Hdmi sound not working on ps3, ......
Read more >
Implementing Modal Bottom Sheet in Fragment
If the content outside of the dialog is tapped then the bottom sheet is dismissed. Modal bottom sheets can be dragged vertically and...
Read more >
Flutter 1.12.13 release notes
41946 Do not validate the Android SDK when building an appbundle ... 38650 Allow independent theming of Persistent and Modal bottom sheets.
Read more >
xVASynth 2 - SKVA Synth at Skyrim Special Edition Nexus
Voice Acting · Modder's Resource · Non-Playable Resource ... would be too niche or too game-specific to add to the base app for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found