I'm working on an app that has about the same functionality as of the parallex demo, and for some reason, sometimes, when changing the orientation from portrait to landscape, I've noticed that onScrollChanged gets called with a huge boost to the y-scrolling (448 in the case of HTC One M8) .
This causes an issue when the orientation change has completed , as it puts the scrollview scroll-y about in the middle of the screen.
I've worked on this for the whole day and thought it has something to do with the code I've made, but I still don't know why it occurs.
Here are some extra clues:
it's in an activity.
the bottom area (the content) consist of views that are created both dynamically (via code) and statically (via XML).
the upper area (the imageView/header) is of a constant height of 250dp.
if I don't use "setSaveEnabled(false)" on the ObservableScrollView , the header might go down a bit, causing a gap to appear above it.
on a similar activity, which has all views being created statically (via XML), I can't reproduce it.
I'm working on an app that has about the same functionality as of the parallex demo, and for some reason, sometimes, when changing the orientation from portrait to landscape, I've noticed that onScrollChanged gets called with a huge boost to the y-scrolling (448 in the case of HTC One M8) .
This causes an issue when the orientation change has completed , as it puts the scrollview scroll-y about in the middle of the screen.
I've worked on this for the whole day and thought it has something to do with the code I've made, but I still don't know why it occurs.
Here are some extra clues:
How could it be?