Open next activity only after navigation drawer completes it closing animation

后端 未结 7 423
陌清茗
陌清茗 2020-12-30 10:13

I\'m using Navigation Drawer in my application.

When the user clicks on any of the menu item in drawer, it opens a new Activity (not fr

7条回答
  •  说谎
    说谎 (楼主)
    2020-12-30 10:59

    You can open Activity with a delay. For example, in such a way Activity will be started after 250ms:

    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            Intent intent = new Intent();
            startActivity(intent);
            finish();
        }
    }, 250);
    mDrawerLayout.closeDrawer(mDrawerList);
    

提交回复
热议问题