I have activity A. When I go to settings from the Nav Drawer, I change some settings and back (via the back or home), most of the times the onStart() in activity A gets called.
This is where I load the shared Prefs.
However, sometimes onStart() doesn't get called and it goes directly to onResume(). Once this happens once, repeating this user interaction will always return to onResume() and not call onStart() of Activity A.
Any idea why?
我认为最好在onResume
而不是onStart
上执行此操作,因为如果应用程序暂停,重新启动或创建,则将调用onResume
但是在onRestart
或onCreate
之后会触发onStart
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.