OSDN Git Service

Visual updates for popup
[android-x86/packages-apps-Launcher3.git] / src / com / android / launcher3 / notification / NotificationItemView.java
index e5bf35a..dd272b3 100644 (file)
@@ -21,6 +21,7 @@ import android.app.Notification;
 import android.content.Context;
 import android.graphics.Rect;
 import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
@@ -93,7 +94,7 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
             if (mNotificationHeaderTextColor == Notification.COLOR_DEFAULT) {
                 mNotificationHeaderTextColor =
                         IconPalette.resolveContrastColor(getContext(), palette.dominantColor,
-                            getResources().getColor(R.color.notification_header_background_color));
+                            getResources().getColor(R.color.popup_header_background_color));
             }
             mHeaderCount.setTextColor(mNotificationHeaderTextColor);
         }
@@ -158,6 +159,13 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
     }
 
     @Override
+    public int getArrowColor(boolean isArrowAttachedToBottom) {
+        return ContextCompat.getColor(getContext(), isArrowAttachedToBottom
+                ? R.color.popup_background_color
+                : R.color.popup_header_background_color);
+    }
+
+    @Override
     public void fillInLogContainerData(View v, ItemInfo info, LauncherLogProto.Target target,
             LauncherLogProto.Target targetParent) {
         target.itemType = LauncherLogProto.ItemType.NOTIFICATION;