Merge "Update folder pagination dot color to match mocks." into sc-v2-dev
This commit is contained in:
commit
47f0c5fba4
|
@ -41,6 +41,8 @@
|
|||
<color name="wallpaper_popup_scrim">@android:color/system_neutral1_900</color>
|
||||
|
||||
<color name="folder_dot_color">@android:color/system_accent2_50</color>
|
||||
<color name="folder_pagination_color_light">@android:color/system_accent1_600</color>
|
||||
<color name="folder_pagination_color_dark">@android:color/system_accent2_100</color>
|
||||
|
||||
<color name="home_settings_header_accent">@android:color/system_accent1_600</color>
|
||||
<color name="home_settings_header_collapsed">@android:color/system_neutral1_100</color>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<attr name="popupNotificationDotColor" format="color" />
|
||||
|
||||
<attr name="folderDotColor" format="color" />
|
||||
<attr name="folderPaginationColor" format="color" />
|
||||
<attr name="folderFillColor" format="color" />
|
||||
<attr name="folderIconRadius" format="float" />
|
||||
<attr name="folderIconBorderColor" format="color" />
|
||||
|
|
|
@ -73,6 +73,8 @@
|
|||
<color name="folder_background_dark">#464746</color>
|
||||
|
||||
<color name="folder_dot_color">?attr/colorPrimary</color>
|
||||
<color name="folder_pagination_color_light">#ff006c5f</color>
|
||||
<color name="folder_pagination_color_dark">#ffbfebe3</color>
|
||||
|
||||
<color name="text_color_primary_dark">#FFFFFFFF</color>
|
||||
<color name="text_color_secondary_dark">#FFFFFFFF</color>
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
|
||||
<item name="folderDotColor">@color/folder_dot_color</item>
|
||||
<item name="folderPaginationColor">@color/folder_pagination_color_light</item>
|
||||
<item name="folderFillColor">@color/folder_background_light</item>
|
||||
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
|
||||
<item name="folderTextColor">@color/workspace_text_color_dark</item>
|
||||
|
@ -108,6 +109,7 @@
|
|||
<item name="popupShadeThird">@color/popup_shade_third_dark</item>
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
|
||||
<item name="folderDotColor">@color/folder_dot_color</item>
|
||||
<item name="folderPaginationColor">@color/folder_pagination_color_dark</item>
|
||||
<item name="folderFillColor">@color/folder_background_dark</item>
|
||||
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
|
||||
<item name="folderTextColor">@color/workspace_text_color_light</item>
|
||||
|
|
|
@ -53,6 +53,9 @@ public class PageIndicatorDots extends View implements PageIndicator {
|
|||
private static final int ENTER_ANIMATION_STAGGERED_DELAY = 150;
|
||||
private static final int ENTER_ANIMATION_DURATION = 400;
|
||||
|
||||
private static final int DOT_ACTIVE_ALPHA = 255;
|
||||
private static final int DOT_INACTIVE_ALPHA = 128;
|
||||
|
||||
// This value approximately overshoots to 1.5 times the original size.
|
||||
private static final float ENTER_ANIMATION_OVERSHOOT_TENSION = 4.9f;
|
||||
|
||||
|
@ -75,8 +78,6 @@ public class PageIndicatorDots extends View implements PageIndicator {
|
|||
|
||||
private final Paint mCirclePaint;
|
||||
private final float mDotRadius;
|
||||
private final int mActiveColor;
|
||||
private final int mInActiveColor;
|
||||
private final boolean mIsRtl;
|
||||
|
||||
private int mNumPages;
|
||||
|
@ -110,12 +111,10 @@ public class PageIndicatorDots extends View implements PageIndicator {
|
|||
|
||||
mCirclePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mCirclePaint.setStyle(Style.FILL);
|
||||
mCirclePaint.setColor(Themes.getAttrColor(context, R.attr.folderPaginationColor));
|
||||
mDotRadius = getResources().getDimension(R.dimen.page_indicator_dot_size) / 2;
|
||||
setOutlineProvider(new MyOutlineProver());
|
||||
|
||||
mActiveColor = Themes.getColorAccent(context);
|
||||
mInActiveColor = Themes.getAttrColor(context, android.R.attr.colorControlHighlight);
|
||||
|
||||
mIsRtl = Utilities.isRtl(getResources());
|
||||
}
|
||||
|
||||
|
@ -253,18 +252,18 @@ public class PageIndicatorDots extends View implements PageIndicator {
|
|||
circleGap = -circleGap;
|
||||
}
|
||||
for (int i = 0; i < mEntryAnimationRadiusFactors.length; i++) {
|
||||
mCirclePaint.setColor(i == mActivePage ? mActiveColor : mInActiveColor);
|
||||
mCirclePaint.setAlpha(i == mActivePage ? DOT_ACTIVE_ALPHA : DOT_INACTIVE_ALPHA);
|
||||
canvas.drawCircle(x, y, mDotRadius * mEntryAnimationRadiusFactors[i], mCirclePaint);
|
||||
x += circleGap;
|
||||
}
|
||||
} else {
|
||||
mCirclePaint.setColor(mInActiveColor);
|
||||
mCirclePaint.setAlpha(DOT_INACTIVE_ALPHA);
|
||||
for (int i = 0; i < mNumPages; i++) {
|
||||
canvas.drawCircle(x, y, mDotRadius, mCirclePaint);
|
||||
x += circleGap;
|
||||
}
|
||||
|
||||
mCirclePaint.setColor(mActiveColor);
|
||||
mCirclePaint.setAlpha(DOT_ACTIVE_ALPHA);
|
||||
canvas.drawRoundRect(getActiveRect(), mDotRadius, mDotRadius, mCirclePaint);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue