开发者

Android. How to operate by history stack?

开发者 https://www.devze.com 2023-04-09 22:45 出处:网络
Questions 1. How to make the same functionality as physical button开发者_C百科 \"Back\" on android phone?

Questions 1. How to make the same functionality as physical button开发者_C百科 "Back" on android phone? 2. Is it possible to make "Next" button using android history stack? I understand that probably it is not possible, but may be yes. So please let me know exactly


Question 1: Just call finish()

Question 2: I'm not sure about this. But I think when you call finish the Activity gets removed from the history stack. If you want something like next you could start the Activities using startActivityForResult() and then use onActivityResult() to determine that the user hit back/you finished the activity and save that somehow.

0

精彩评论

暂无评论...
验证码 换一张
取 消