diff options
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationItemView.java')
-rw-r--r-- | src/com/android/launcher3/notification/NotificationItemView.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/com/android/launcher3/notification/NotificationItemView.java b/src/com/android/launcher3/notification/NotificationItemView.java index 997def277..cc81b1121 100644 --- a/src/com/android/launcher3/notification/NotificationItemView.java +++ b/src/com/android/launcher3/notification/NotificationItemView.java @@ -21,7 +21,6 @@ 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; @@ -30,11 +29,12 @@ import android.widget.TextView; import com.android.launcher3.ItemInfo; import com.android.launcher3.R; -import com.android.launcher3.anim.PillHeightRevealOutlineProvider; +import com.android.launcher3.anim.RoundedRectRevealOutlineProvider; import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider; import com.android.launcher3.popup.PopupItemView; import com.android.launcher3.userevent.nano.LauncherLogProto; +import com.android.launcher3.util.Themes; import java.util.List; @@ -87,9 +87,10 @@ public class NotificationItemView extends PopupItemView implements LogContainerP } public Animator animateHeightRemoval(int heightToRemove) { - final int newHeight = getHeight() - heightToRemove; - return new PillHeightRevealOutlineProvider(mPillRect, - getBackgroundRadius(), newHeight).createRevealAnimator(this, true /* isReversed */); + Rect endRect = new Rect(mPillRect); + endRect.bottom -= heightToRemove; + return new RoundedRectRevealOutlineProvider(getBackgroundRadius(), getBackgroundRadius(), + mPillRect, endRect, mRoundedCorners).createRevealAnimator(this, false); } public void updateHeader(int notificationCount, @Nullable IconPalette palette) { @@ -98,7 +99,7 @@ public class NotificationItemView extends PopupItemView implements LogContainerP if (mNotificationHeaderTextColor == Notification.COLOR_DEFAULT) { mNotificationHeaderTextColor = IconPalette.resolveContrastColor(getContext(), palette.dominantColor, - getResources().getColor(R.color.popup_header_background_color)); + Themes.getAttrColor(getContext(), R.attr.popupColorPrimary)); } mHeaderCount.setTextColor(mNotificationHeaderTextColor); } @@ -163,13 +164,6 @@ 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; |