On Tue, Dec 27, 2011 at 8:35 PM, havexz <bali.param...@gmail.com> wrote: >> You are assuming that it is the same Spinner object and the same >> OnItemSelectedListener. Instead, it is a completely different Spinner >> instance and a completely different OnItemSelectedListener instance, >> for a completely different fragment instance in a completely different >> activity instance. > > What you mean by this? There is only one spinner having one dedicated > inner class listener for it.
When you change configurations, such as changing screen orientation, your original activity is destroyed and a brand new activity is created. That brand-new activity will create its own static fragment, which will create its own Spinner and listener. > Since the above code is from tutorial, > there is no Fragment involved. It is a very basic implementation. You said: > Well I am using fragments but create from xml. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en