Assigned
Status Update
Comments
al...@google.com <al...@google.com> #2
I face with the same problem. I have different pageMargin in landscape and portrait and when viewpager is scrolled for the more than first position, after rotating device it is shifted.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
al...@google.com <al...@google.com> #4
I found the same problem in suport library v4, wrong align happens only when ViewPager has a page margin > 0.
Description
We should deprecate makeOptionalFitsSystemWindows or migrate the implementation away from using reflection on the latest SDKs, but it's unclear if that should move to using
PFLAG4_FRAMEWORK_OPTIONAL_FITS_SYSTEM_WINDOWS
which is hidden.Handing off to WM team as suggested on b/316905984 .