Back key handle
Closed this issue · 2 comments
mousamk commented
First I thank for this helpful library. I'm already using it and it saved my time.
I think it's common that when the menu pane is visible, pressing the back button should close it, instead of closing the Activity itself (the default behavior). I checked and didn't see this. Does AndroidSlideMenu support it and we have to enable it somehow, or not?
mousamk commented
Anyhow, I used this code to get the mentioned behavior:
@Override
public void onBackPressed()
{
SlideHolder sh = (SlideHolder)findViewById(R.id.slide_holder);
if (sh.isOpened())
sh.close();
else
super.onBackPressed();
}
dmitry-zaitsev commented
@mousamk yeah, I just wanted to answer you with exactly the same solution :)