Thursday, March 8, 2012

[android-developers] Scroll position is not the same when orientation changes.

I have a scroll view activity under which I have lot's of UI objects.
 
Now let's say when the activity starts up, the view is right on top.
 
Now if I change the orientation of the phone, I observe that my activity has automatically scrolled to a different position.
I don't want the scroll position to change, i.e. I want to see approximately the same content.
 
I tried fixing it by saving the scroll position in the 'onSaveInstanceState' and then restoring it in 'onCreate'.
But didn't work.
 
How do I fix this?

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

No comments:

Post a Comment