Android. How to operate by history stack?
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.
精彩评论