DrawerLayout's item click - When is the right time to replace fragment?

后端 未结 7 787
轻奢々
轻奢々 2020-12-07 11:16

I\'m developing an application which uses the navigation drawer pattern (With DrawerLayout).

Each click on a drawer\'s item, replaces the fragment in the main contai

7条回答
  •  死守一世寂寞
    2020-12-07 12:04

    Just write your code in a handler and put 200 ms delay.

     new Handler().postDelayed(new Runnable() {
      @Override
       public void run() {
           openSelectionDrawerItem(position);          
       }
     }, 200);
    

提交回复
热议问题