NappDrawer icon indicating copy to clipboard operation
NappDrawer copied to clipboard

back

Open amrdesign opened this issue 10 years ago • 2 comments

hello how can i add back button to main windows

thanks

amrdesign avatar Oct 11 '14 04:10 amrdesign

can i use back button in android version , when i use it it close drawer

amrdesign avatar Oct 11 '14 05:10 amrdesign

You could accomplish this yourself. Add an event listener to watch for the android back button pressed. Here is a code sample that should accomplish this. There are two event listeners because Android emits different events depending on the version. See docs.

$.drawer.window.addEventListener('android:back', androidBackPressed);
$.drawer.window.addEventListener('androidback', androidBackPressed);

function androidBackPressed() {
  if ($.drawer.isLeftWindowOpen) {
    $.drawer.toggleLeftWindow();
  }
}

collinprice avatar May 28 '15 20:05 collinprice