How i can close/exit button on my app?

前端 未结 6 1744
慢半拍i
慢半拍i 2021-01-23 20:45

i have a button to close my app with this code:

finish();

the problem is that this button doesn\'t exit of my app... it simply closes the current intent ant retu

6条回答
  •  误落风尘
    2021-01-23 21:38

    finish() closes activity (this is what you call intent, but it's not correct), not application. Application can not be finished at all (only forcefully killed like task killers do). You should design your activity stack in such a way that it will suit your needs. May be you should look at stack rearrangement examples in ApiDemos.

提交回复
热议问题