This repository was archived by the owner on Dec 14, 2022. It is now read-only.
Description Hi Steffey,
This plugin helped me a lot. Thank you.
I encountered a warning when run your test from "react-native-popover-view-test-app" , each time I click the "settings" icon on top-right.
My code looks like it below:
let shouldShowInPopover = true ;
class MoreDropdown extends Component {
render ( ) {
return (
< ScrollView contentContainerStyle = { { padding : 20 } } >
< Text style = { { fontSize : 16 , fontWeight : 'bold' , marginBottom : 10 } } > Popover Navigation</ Text >
< Text > Show Stack Views in Popover</ Text >
< View style = { styles . row } >
< View style = { { flex : 1 } } >
< Text > Show Stack Views in Popover</ Text >
< Text style = { { fontSize : 10 , color : 'gray' , marginTop : 5 } } > You will need to change the device orientation for this setting to take effect.</ Text >
</ View >
< Switch value = { shouldShowInPopover } onValueChange = { ( ) => {
shouldShowInPopover = ! shouldShowInPopover ;
this . forceUpdate ( ) ;
} } />
</ View >
</ ScrollView >
)
}
}
const AnaPopoverStack = createPopoverStackNavigator ( {
Analysis : {
screen : props => < Analysis navigation = { props . navigation } { ...props . screenProps } /> ,
navigationOptions : ( { navigation} ) => ( {
title : '知己' ,
headerRight :
< TouchableOpacity ref = { ref => createPopoverStackNavigator . registerRefForView ( ref , 'MoreDropdown' ) } onPress = { ( ) => navigation . navigate ( 'MoreDropdown' ) } style = { { width : 60 , alignItems : 'center' } } > < Icon name = "dots-horizontal" size = { 30 } /> </ TouchableOpacity > ,
} )
} ,
MoreDropdown : {
screen : MoreDropdown ,
navigationOptions : { title : "MoreDropdown" } ,
popoverOptions : {
contentContainerStyle : {
minWidth : 300
}
}
}
} , {
popoverOptions : {
verticalOffset : Platform . OS === 'android' ? - StatusBar . currentHeight : 0
}
} )
export default class StackWrapper extends Component {
render ( ) {
return (
< AnaPopoverStack screenProps = { { showInPopover : shouldShowInPopover } } />
) ;
}
}
Any idea about that?
Reactions are currently unavailable
Hi Steffey,
This plugin helped me a lot. Thank you.
I encountered a warning when run your test from "react-native-popover-view-test-app", each time I click the "settings" icon on top-right.
My code looks like it below:
Any idea about that?