Rotation causes a complete teardown and recreate of your Activity, as you 
have already learned.

So here are some options to consider:
 - overide onSaveInstanceState(), and place your info into a Bundle, and 
pull it back out in onCreate()
 - Application instance (android.app.Application)
 - Singleton
 - Static variables

The first option is great if you don't have too much data.  Otherwise, the 
remaining 3 are roughly equivalent, and the choice is a matter of design 
preference.

-- 
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

Reply via email to