Fix overview grid scroll problem
- This can be reproduced ocassionally without any obvious pattern, when this happen the page scroll and min/max scroll is messed up - When this happen, onLayout happens before the first setGridProgress call from animations - The fix is to request a relayout at the end of state transition Bug: 174464863 Test: manual Change-Id: I12683c49d7ed72349a4b9cb3b4d3871741e3e22e
This commit is contained in:
1 parent
d10382995f
commit
ae53cb246f
4 files changed
+46
-20
No files matched your search
@@ -130,16 +130,16 @@ public class ClearAllButton extends Button implements PageCallbacks {
|
||||
applyPrimaryTranslation();
|
||||
}
|
||||
|
||||
public float getScrollAdjustment() {
|
||||
public float getScrollAdjustment(boolean gridEnabled) {
|
||||
float scrollAdjustment = 0;
|
||||
if (mGridProgress > 0) {
|
||||
if (gridEnabled) {
|
||||
scrollAdjustment += mGridTranslationPrimary;
|
||||
}
|
||||
return scrollAdjustment;
|
||||
}
|
||||
|
||||
public float getOffsetAdjustment() {
|
||||
return getScrollAdjustment();
|
||||
public float getOffsetAdjustment(boolean gridEnabled) {
|
||||
return getScrollAdjustment(gridEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user