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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -