1, By default, if android system configuration is changed, only top activity is
restarted (onDestroy is invoked, then onCreate is invoked) immediately, and
other activities in history stack will defer to be restarted once they are
resumed.
2, I need to do extra works once configuration changed, so I capture
configuration changes event. and in onConfiguratonChanged, I restart activity
as following:
finish();
Intent intent = new Intent(this, getClass());
startActivity(intent);
The issues occur:
a), All activities in history stack will receive such event, so all activities
will be restart immediately, and activities stack is reordered reversedly.
b), When restarted activity, onCreate is invoked before onDestroy()
my question is: If I myself handle configuration changes event, how to restart
activity as Android does by default.
Thanks very much!
- Jiang
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en