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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -