handling activites and layouts android
This question already has an answer here:
From Activity2, when clicking Button to go to Activity1 Simply on button.onClickListener
Add this.finish();
And don't explicitly call the Activity1.
So your data wont be lost.
只需使用startActivityForResult
方法调用activity2
并在单击按钮时从activity2
调用setResult()
然后在activity1
finish
并处理onActivityResult
事件,以获取更多信息,您可以参阅此Android startActivityForResult
和相关的后Handling result
上一篇: 如何在android中保持会话?
下一篇: 处理活动和布局android