Assigned
Status Update
Comments
vi...@google.com <vi...@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.
ra...@google.com <ra...@google.com>
im...@gmail.com <im...@gmail.com> #3
[Comment deleted]
Description
Steps to reproduce the problem (including sample code if appropriate).
Run
Target 35
apps running onAndroid 15
.Call
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES/NO)
.What happened.
Activity/Fragment insets set before are lost.
Under the hood:
setOnApplyWindowInsetsListener()
does not been called when activity re-creating for views other thanwindow.decorView
.Maybe
Edge-to-Edge
ofTarget 35
does not enforced in this case?What you think the correct behavior should be.
Just like
Android 5.0
~Android 14
.Call
setOnApplyWindowInsetsListener()
.If we set
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_FOLLOW_SYSTEM)
,then it works like charm before.
Is this a security related issue?
No
Simple sample
Android 15 Sample.mov
:Here is also one app that can reproduce this issue.
See
Android 15 LLD.mov
for the reproduction steps.