Merge "Ensure page scrolls are initialized even for 0 children." into tm-dev am: 1e211e0c03
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18625747 Change-Id: I2740fe27aefc4630b9680eef60eca25692c01964 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bc8affdfb6
1 file changed
+5
-4
@@ -727,15 +727,16 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
|||||||
pageScrollChanged = true;
|
pageScrollChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (childCount == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
|
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
|
||||||
|
|
||||||
pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
|
pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
|
||||||
mPageScrolls = pageScrolls;
|
mPageScrolls = pageScrolls;
|
||||||
|
|
||||||
|
if (childCount == 0) {
|
||||||
|
onPageScrollsInitialized();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final LayoutTransition transition = getLayoutTransition();
|
final LayoutTransition transition = getLayoutTransition();
|
||||||
// If the transition is running defer updating max scroll, as some empty pages could
|
// If the transition is running defer updating max scroll, as some empty pages could
|
||||||
// still be present, and a max scroll change could cause sudden jumps in scroll.
|
// still be present, and a max scroll change could cause sudden jumps in scroll.
|
||||||
|
|||||||
Reference in new issue
Block a user