Close drawer layout on Backpress in Android - not working in webview -
i'm using following close drawer layout in android webview app.
@override public void onbackpressed() { if (mdrawerlayout.isdrawervisible(gravitycompat.start)) { mdrawerlayout.closedrawer(gravitycompat.start); } else { super.onbackpressed(); } }
works on homepage of webview, if browse page in webview using link , open drawer, not close on press. rather webview navigates previous page in background without closing drawer.
mdrawerlayout.setdescendantfocusability(viewgroup.focus_block_descendants);
fixes issue, have editview , causes issues mentioned @ drawer layout not closing on pressed (depending on support-v4 lib)
Comments
Post a Comment