react-native-popup-menu
react-native-popup-menu copied to clipboard
Menu won't show up on Android/ fine on iOS
The popup unit works fine on iOS. But it will not shop up on Android when I test it on Android simulator.
I'm looking for a up-to-date solution that works for React Native Android environment.
My app looks like this right now:
Import all the tools.
import { MenuProvider } from 'react-native-popup-menu'; import { Menu, MenuOptions, MenuOption, MenuTrigger } from 'react-native-popup-menu';
The main app looks like this. Everything is wrapped within MenuProvider.
export class App1 extends Component { render() { return ( <MenuProvider> <View style={styles.container}> <MoreStuff navigation={this.props.navigation} /> <TopMenu1 navigation={this.props.navigation} /> <View1Map /> </View> </MenuProvider> ); } }
This is where I built the pop-up menu. I am following example from the official tutorial.
https://github.com/instea/react-native-popup-menu
In the order of appearance, I have View> element, followed by Menu>, MenuTrigger>, MenuOptions> and MenuOption>.
`export class MoreStuff extends Component {
render(){ return ( <View>
);
} }`
Expected: When you click on the MenuTrigger element, the popup menu will come up. Actual result: When you click on the MenuTrigger element, nothing happens.
your code is somehow malformed. but I have seen your SO question and nothing apparent seems wrong. can you make simple expo snack to reproduce the problem.
however mostly the problems are if MenuProvider
does not cover whole screen.
Thanks @sodik82 I just created an Expo thing. https://snack.expo.io/@leourushi/9b7f56
And the menu seems to be working in this environment. I opened my original with Android emulator running debug mode (react-native log-android). But I didn't see anything there. I can't really identify what the problem is, I'm afraid.