What is Activity.finish() method doing exactly?

前端 未结 12 1948
别那么骄傲
别那么骄傲 2020-11-22 16:16

I\'m developing android applications for a while, and followed a lot of posts about activity life cycle, and application\'s life cycle.

I know Activity.finish

12条回答
  •  甜味超标
    2020-11-22 16:48

    Also notice if you call finish() after an intent you can't go back to the previous activity with the "back" button

    startActivity(intent);
    finish();
    

提交回复
热议问题