Assigned
Status Update
Comments
ra...@google.com <ra...@google.com>
th...@gmail.com <th...@gmail.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.
Description
Project for reproduce issue:https://github.com/dimka-sark/android-34-theme-issue
Overview
ContextThemeWrapper.setTheme(id)
on API <= 33 and API 34 are different implementationIn our project we found that issue in
ThemeKey
.In 34 API at:https://cs.android.com/android/_/android/platform/frameworks/base/+/ab3cb30aa0ea166c8bcb0531a5a47ca119a000c3:core/java/android/content/res/Resources.java;l=2024
Theme can't be set more then one time. For example:
Theme A not applied properly, drawable cache use last unique theme set (Theme B in example)
We see that inhttps://cs.android.com/android/_/android/platform/frameworks/base/+/c2ad00b665d75e3d1dc68c0feb382f852c4d75c5:core/java/android/content/res/Resources.java;l=2041?hl=ru
main
branch source code ofThemeKey
are changed.We have no option to check if new version are fix drawable cache issue, but we assume that hash code need also to be recalculated after move, for correct
equals
/hashcode
contractWorkaround solution (may be need app compat version of this)