Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40bcc23d authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Always update PageIndicator visibility" into rvc-dev am: fc0a6258 am:...

Merge "Always update PageIndicator visibility" into rvc-dev am: fc0a6258 am: 20b6f7ff am: ca7e2078 am: 7dcd752d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11738043

Change-Id: Icc856f72eba553fcd8fdb6f396cc1f4759196944
parents 68a97794 7dcd752d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -45,9 +45,6 @@ public class PageIndicator extends ViewGroup {
    }

    public void setNumPages(int numPages) {
        if (numPages == getChildCount()) {
            return;
        }
        TypedArray array = getContext().obtainStyledAttributes(
                new int[]{android.R.attr.colorControlActivated});
        int color = array.getColor(0, 0);
@@ -55,12 +52,12 @@ public class PageIndicator extends ViewGroup {
        setNumPages(numPages, color);
    }

    /** Oveload of setNumPages that allows the indicator color to be specified.*/
    /** Overload of setNumPages that allows the indicator color to be specified.*/
    public void setNumPages(int numPages, int color) {
        setVisibility(numPages > 1 ? View.VISIBLE : View.GONE);
        if (numPages == getChildCount()) {
            return;
        }
        setVisibility(numPages > 1 ? View.VISIBLE : View.GONE);
        if (mAnimating) {
            Log.w(TAG, "setNumPages during animation");
        }