diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 98e8cde40275d..7ae8b55afb915 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -504,6 +504,10 @@ 18dp 16dp 8dp + + 6.4dp 24dp 12sp 1dp diff --git a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java index 52a2cecec6b1d..0053fea35262f 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java @@ -2,6 +2,7 @@ package com.android.systemui.qs; import android.content.Context; import android.content.res.ColorStateList; +import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.drawable.Animatable2; import android.graphics.drawable.AnimatedVectorDrawable; @@ -31,9 +32,6 @@ public class PageIndicator extends ViewGroup { private static final long ANIMATION_DURATION = 250; - // The size of a single dot in relation to the whole animation. - private static final float SINGLE_SCALE = .4f; - private static final float MINOR_ALPHA = .42f; private final ArrayList mQueuedPositions = new ArrayList<>(); @@ -75,11 +73,10 @@ public class PageIndicator extends ViewGroup { } array.recycle(); - mPageIndicatorWidth = - (int) mContext.getResources().getDimension(R.dimen.qs_page_indicator_width); - mPageIndicatorHeight = - (int) mContext.getResources().getDimension(R.dimen.qs_page_indicator_height); - mPageDotWidth = (int) (mPageIndicatorWidth * SINGLE_SCALE); + Resources res = context.getResources(); + mPageIndicatorWidth = res.getDimensionPixelSize(R.dimen.qs_page_indicator_width); + mPageIndicatorHeight = res.getDimensionPixelSize(R.dimen.qs_page_indicator_height); + mPageDotWidth = res.getDimensionPixelSize(R.dimen.qs_page_indicator_dot_width); } public void setNumPages(int numPages) {