How to control Activity flow - Back button versus Home button

后端 未结 4 1465
眼角桃花
眼角桃花 2021-01-01 05:52

I have 3 activities in my application:

Activity1 -> Activity2 -> Activity3

Inside Activity3, if the user presses Back, I would like t

4条回答
  •  一个人的身影
    2021-01-01 06:42

    @RMS2 the answer that you suggested.. will that provide back functionality? I also faced similar problem so instead of overriding onpause and on resume, I have overriden onUserLeaveHint() method. In this way my application knows when user is pressing home button and finish the activity.

提交回复
热议问题