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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -