I have a problem with startActivity()
methods.
Problem Structure
LinkCatcher
class (because some TextView exist almost all activity, so i using outer class) MainActivity
using Otto (because it prevent startActivity outside of activity
problem.) Activity B
without any Flag, just one extra (link) onCreate(Bundle savedInstanceState)
(i insert some Log.e to my Code, definitely it re-call Log code) Tried Methods
I tried all methods which i try it. and i don't know why activity is destroy and re-call onCreate (not onResume) even i don't use any finish() methods.
Because that's how Android is designed- at any moment an Activity not currently on screen can be killed. You can't prevent it. What you can do is account for it- you can save off any necessary data in onSaveInstanceState, and restore it in onCreate from the Bundle or in onRestoreInstanceState.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.