Android, Intent.FLAG_ACTIVITY_CLEAR_TOP seems doesn't work?

后端 未结 6 580
忘掉有多难
忘掉有多难 2020-12-16 08:25

In my menu I have some items. Home is an item of it that I want to be root of my application and whenever user clicks on it, Android clear stack and then come back to main s

6条回答
  •  既然无缘
    2020-12-16 09:00

    maybe this works :

    intent = new Intent(getApplicationContext(), MainScreen.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    

提交回复
热议问题