젤리빈 (API 16) 부터 사용가능합니다.
Activity.finishAffinity();
current task 에 존재하는 관련성(affinity)이 깊은 모든 액티비티를 종료한다. (현재 액티비티도 포함)
public void finishAffinity ()
Finish this activity as well as all activities immediately below it in the current task that have the same affinity. This is typically used when an application can be launched on to another task (such as from an ACTION_VIEW of a content type it understands) and the user has used the up navigation to switch out of the current task and in to its own task. In this case, if the user has navigated down into any other activities of the second application, all of those should be removed from the original task as part of the task switch.
Note that this finish does not allow you to deliver results to the previous activity, and an exception will be thrown if you are trying to do so.
'JAVA > Android' 카테고리의 다른 글
안드로이드 그라데이션 (0) | 2015.07.23 |
---|---|
[Android] WebView에서 Alert 경고창 보이게 하기. (0) | 2015.07.01 |
Handler 와 Looper (336) | 2015.06.28 |
Android Thread , Handler , Looper , Message 관계 (336) | 2015.06.23 |
안드로이드 Handler 사용방법 (166) | 2015.06.23 |