Merge "Take panel count into account for page indicator size" into sc-v2-dev am: be34ef61a3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15873888

Change-Id: I68382a61ec6e2524c012391b6c8c903cd6b36dfb
This commit is contained in:
Tony Wickham
2021-09-21 15:56:38 +00:00
committed by Automerger Merge Worker
+2 -2
View File
@@ -208,7 +208,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
public void initParentViews(View parent) {
if (mPageIndicatorViewId > -1) {
mPageIndicator = parent.findViewById(mPageIndicatorViewId);
mPageIndicator.setMarkersCount(getChildCount());
mPageIndicator.setMarkersCount(getChildCount() / getPanelCount());
}
}
@@ -830,7 +830,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
private void dispatchPageCountChanged() {
if (mPageIndicator != null) {
mPageIndicator.setMarkersCount(getChildCount());
mPageIndicator.setMarkersCount(getChildCount() / getPanelCount());
}
// This ensures that when children are added, they get the correct transforms / alphas
// in accordance with any scroll effects.