Merge "Update notification dot color" into udc-dev
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 985fe77..0c036ff 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -28,6 +28,9 @@
<color name="popup_notification_dot_light">@android:color/system_accent1_100</color>
<color name="popup_notification_dot_dark">@android:color/system_accent2_600</color>
+ <color name="notification_dot_color_light">@android:color/system_accent3_200</color>
+ <color name="notification_dot_color_dark">@android:color/system_accent3_100</color>
+
<color name="workspace_text_color_light">@android:color/system_neutral1_0</color>
<color name="workspace_text_color_dark">@android:color/system_neutral1_1000</color>
@@ -40,7 +43,6 @@
<color name="wallpaper_popup_scrim">@android:color/system_neutral1_900</color>
- <color name="folder_dot_color">@android:color/system_accent3_100</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>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 8136534..418f5a7 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -40,8 +40,8 @@
<attr name="eduHalfSheetBGColor" format="color" />
<attr name="overviewScrimColor" format="color" />
<attr name="popupNotificationDotColor" format="color" />
+ <attr name="notificationDotColor" format="color" />
- <attr name="folderDotColor" format="color" />
<attr name="folderPaginationColor" format="color" />
<attr name="folderPreviewColor" format="color" />
<attr name="folderBackgroundColor" format="color" />
@@ -90,7 +90,6 @@
<declare-styleable name="FolderIconPreview">
<attr name="folderPreviewColor" />
<attr name="folderIconBorderColor" />
- <attr name="folderDotColor" />
</declare-styleable>
<declare-styleable name="SearchResultSuggestion">
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 9e73453..b1bff18 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -54,6 +54,9 @@
<color name="popup_notification_dot_light">#FFF</color>
<color name="popup_notification_dot_dark">#757575</color>
+ <color name="notification_dot_color_light">#6DD58C</color>
+ <color name="notification_dot_color_dark">#C4EED0</color>
+
<color name="workspace_text_color_light">#FFF</color>
<color name="workspace_text_color_dark">#FF000000</color>
@@ -66,7 +69,6 @@
<color name="folder_preview_light">#F9F9F9</color>
<color name="folder_preview_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>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 11861b9..8f75550 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -41,6 +41,7 @@
<item name="popupShadeSecond">@color/popup_shade_second_light</item>
<item name="popupShadeThird">@color/popup_shade_third_light</item>
<item name="popupNotificationDotColor">@color/popup_notification_dot_light</item>
+ <item name="notificationDotColor">@color/notification_dot_color_light</item>
<item name="isMainColorDark">false</item>
<item name="isWorkspaceDarkText">false</item>
<item name="workspaceTextColor">@color/workspace_text_color_light</item>
@@ -49,7 +50,6 @@
<item name="workspaceKeyShadowColor">#89000000</item>
<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="folderPreviewColor">@color/folder_preview_light</item>
<item name="folderBackgroundColor">@color/folder_background_light</item>
@@ -109,8 +109,8 @@
<item name="popupShadeFirst">@color/popup_shade_first_dark</item>
<item name="popupShadeSecond">@color/popup_shade_second_dark</item>
<item name="popupShadeThird">@color/popup_shade_third_dark</item>
+ <item name="notificationDotColor">@color/notification_dot_color_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="folderPreviewColor">@color/folder_preview_dark</item>
<item name="folderBackgroundColor">@color/folder_background_dark</item>
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 450a9f0..f920d75 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -77,6 +77,7 @@
import com.android.launcher3.util.MultiTranslateDelegate;
import com.android.launcher3.util.SafeCloseable;
import com.android.launcher3.util.ShortcutUtil;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.IconLabelDotView;
@@ -387,8 +388,7 @@
}
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
mDotParams.appColor = iconDrawable.getIconColor();
- mDotParams.dotColor = getContext().getResources()
- .getColor(android.R.color.system_accent3_200, getContext().getTheme());
+ mDotParams.dotColor = Themes.getAttrColor(getContext(), R.attr.notificationDotColor);
setIcon(iconDrawable);
applyLabel(info);
}
diff --git a/src/com/android/launcher3/folder/PreviewBackground.java b/src/com/android/launcher3/folder/PreviewBackground.java
index 2465745..406955c 100644
--- a/src/com/android/launcher3/folder/PreviewBackground.java
+++ b/src/com/android/launcher3/folder/PreviewBackground.java
@@ -43,6 +43,7 @@
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
/**
@@ -150,7 +151,7 @@
mInvalidateDelegate = invalidateDelegate;
TypedArray ta = context.getTheme().obtainStyledAttributes(R.styleable.FolderIconPreview);
- mDotColor = ta.getColor(R.styleable.FolderIconPreview_folderDotColor, 0);
+ mDotColor = Themes.getAttrColor(context, R.attr.notificationDotColor);
mStrokeColor = ta.getColor(R.styleable.FolderIconPreview_folderIconBorderColor, 0);
mBgColor = ta.getColor(R.styleable.FolderIconPreview_folderPreviewColor, 0);
ta.recycle();