Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The registerBottomTabLongPressedListener does not work on Android. #7817

Open
1 task done
Csmally opened this issue Dec 5, 2023 · 0 comments
Open
1 task done

The registerBottomTabLongPressedListener does not work on Android. #7817

Csmally opened this issue Dec 5, 2023 · 0 comments

Comments

@Csmally
Copy link

Csmally commented Dec 5, 2023

What happened?

The registerBottomTabLongPressedListener does not work on Android. Long-pressing the bottom button on Android does not trigger the registerBottomTabLongPressedListener, but instead navigates to the corresponding route.

What was the expected behaviour?

When long-pressing the bottom navigation bar, the registerBottomTabLongPressedListener is triggered.

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

// does not work on Android.
Navigation.events().registerBottomTabLongPressedListener(({ selectedTabIndex }) => {
if (selectedTabIndex === 2) {
Navigation.showOverlay({
component: {
name: 'AddNewsScreen',
options: {
layout: {
componentBackgroundColor: 'transparent',
},
overlay: {
interceptTouchOutside: true,
},
},
},
});
}
});

In what environment did this happen?

React Native Navigation version: 7.37.1
React Native version: 0.72.6
Has Fabric (React Native's new rendering system) enabled: (yes/no) yes
Node version: 18.15.0
Device model: Pixel 6
Android version:Android 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant