Merge "Update notification dot color" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-15 20:21:45 +00:00
committed by Android (Google) Code Review
6 changed files with 13 additions and 9 deletions
+3 -1
View File
@@ -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>
+1 -2
View File
@@ -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">
+3 -1
View File
@@ -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>
+2 -2
View File
@@ -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>
@@ -77,6 +77,7 @@ import com.android.launcher3.util.IntArray;
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 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
}
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);
}
@@ -43,6 +43,7 @@ import android.view.View;
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 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
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();