Android Lifecycle Triggers, Part 2
Yesterday I showed how lifecycle events fire in response to starting and stopping an Activity. Next, let’s see what happens when you change the display orientation:
That’s what happens without any customization. I marked two methods bold because they are different than yesterday’s diagram. See this comment from Ed Burnette for more details on customizing rotation behavior. Specifically, you can retain data by overriding
onRetainNonConfigurationInstance(), or you can prevent activity destruction via the
android:configChanges XML attribute.
Android is also useful as a telephone, believe it or not. This next diagram shows what happens when a phone call interrupts an Activity:
Warning: Parameter 2 to wp_hide_post_Public::query_posts_join() expected to be a reference, value given in /home/stuffthathappens/public_html/blog/wp-includes/class-wp-hook.php on line 286