How to use IntentCompat.makeRestartActivityTask()?

前端 未结 3 575
抹茶落季
抹茶落季 2021-01-04 10:58

I\'m trying to implement a button that will result in my app going back to the first activity and acting as if it was (almost) restarted all over. This code

         


        
3条回答
  •  离开以前
    2021-01-04 11:54

    IntentCompat is deprecated which is may be deleted, but Intent class this static method

    Intent mainIntent = Intent.makeRestartActivityTask(cn);

    So just use the above statement.

提交回复
热议问题