Android “single top” launch mode and onNewIntent method

后端 未结 3 539
一个人的身影
一个人的身影 2020-11-30 02:07

I read in the Android documentation that by setting my Activity\'s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent,

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 02:53

    Set this flag to your intent:

    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP)
    

提交回复
热议问题