Android: onBackPressed() not being called when navigation drawer open

前端 未结 8 1905
粉色の甜心
粉色の甜心 2021-02-05 05:54

I have a main activity that is situated with two navigation drawers. The left one is always accessible, but the right one is used for displaying some necessary lists and perform

8条回答
  •  梦谈多话
    2021-02-05 06:37

    After adding this line back button will manage to close DrawerLayout.

    mDrawerLayout.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); 
    

提交回复
热议问题