Is it possible to set three dot context menu using "react-native-popup-menu" in "react-native-navigation" navbar? or do we have any other approach to set three dot context menu in both IOS and Android with "react-native-navigation" navbar?
You can control the priority and positioning of each button (On Android) using the showAsAction
property. See the docs for more details.
In short, the following snippet will add two buttons to the menu and one outside:
static navigatorButtons = {
rightButtons: [
{
id: 'btn1',
title: 'Menu button 1'
showAsAction: 'never'
},
{
id: 'btn2',
title: 'Menu button 2'
showAsAction: 'never'
},
{
id: 'btn3',
title: 'Regular Button'
icon: require('./img/button.jpeg'),
showAsAction: 'always'
}
]
);
This isn't available on iOS since on iOS an action sheet is usually used instead of a menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With