I using Drawer my app, my problem is i want use a custom icon in Drawer Scene and its ok but I dont see any docs to tell me how to open or close the drawer!
This is my router :
<Scene
key="TabbarWrapper"
component={NavigationDrawer}
initial={true} >
<Scene key="Tabbar"
tabs={true}
initial={true}
tabBarStyle={styles.tabBar}
default="ProductExplorer">
<Scene key="ProductExplorer"
title="Lists"
icon={TabIcon}
iconName={"list"}
initial={true}
leftButtonIconStyle={{tintColor: "#FFF"}}
renderBackButton={backButtonFunction}
component={ProductExplorer}/>
<Scene key="Profile"
title="Profile"
icon={TabIcon}
iconName={"gear"}
leftButtonIconStyle={{tintColor: "#FFF"}}
renderBackButton={backButtonFunction}
component={Profile}/>
</Scene>
</Scene>
and this is my button renderer function :
let backButtonFunction = function () {
var TouchableElement = TouchableHighlight;
if (Platform.OS === 'android')TouchableElement = TouchableNativeFeedback;
return (
<TouchableElement onPress={()=>{
**** my problem is here **** what do you think i should do?!what function must be call here to toggle open and close menu?
}} style={{position : "absolute",left: 12,bottom:12}}>
<Icon style={{color: "#FFF"}} name={"bars"} size={23}/>
</TouchableElement>
);
};