Re: [android-developers] the current position value is stale in viewpager getCurrentItem method
On Mon, Aug 5, 2013 at 4:09 AM, julia <kyawswaaung87@gmail.com> wrote:
Yes, I create an new adapter with saved value and set it in the view pager.
Your code does not show where "selectedDate" variable is coming from or being set.
I think the problem is that the view pager can't keep the current value and it loads the previous value when the orientation is occured.
In my brief experience with PageAdapter, it correctly remembers the selected page index on orientation change.
I debugged the process. When the orientation change, oncreate method is called and as soon as onCreate method is finished, onPageSelected method is called.
What is calling onPageSelected? What is the call stack for that?
-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home