NappDrawer icon indicating copy to clipboard operation
NappDrawer copied to clipboard

Close drawer for NappDrawer android

Open ChunAllen opened this issue 11 years ago • 1 comments

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

ChunAllen avatar Feb 18 '14 10:02 ChunAllen

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()

rborn avatar Dec 20 '14 13:12 rborn