NappDrawer
NappDrawer copied to clipboard
Close drawer for NappDrawer android
Hi I saw that there's a close functionality for drawer for iOS. How about to do it on NappDrawer android?
var drawer = NappDrawerModule.createDrawer({
});
drawer.close(); //not working for android
A workaround for android is this:
$.drawer.addEventListener('open', onNavDrawerWinOpen);
function onNavDrawerWinOpen(evt) {
this.removeEventListener('open', onNavDrawerWinOpen);
if(this.getActivity()) {
var activity = this.getActivity();
closeWindow = function(){
activity.finish();
};
...
and instead of drawer.close() you call closeWindow()