Merge deep shortcuts in rounded rect

- DeepShortcutViews are added to ShortcutsItemView, which
  is in PopupContainerWithArrow
- Moved some shortcut-specific logic to ShortcutsItemView
  (namely, touch/long-click handling for draggin shortcuts)
- Moved round-rect clipping to PopupItemView
- Removed collapseToIcon() logic, including
  PillWidthRevealOutlineProvider, which was only used for
  that purpose. It isn't necessary now that the deep
  shortcuts have no background themselves.
- Replaced focus pill drawable with ripple effect on
  shortcuts and notification view.

Bug: 35766387
Change-Id: I6bc09f1851cfbb806df4bf75a6e435b0f1900c9c
This commit is contained in:
Tony Wickham
2017-02-27 16:30:47 -08:00
parent 7f3526a1a4
commit 51889b0be8
17 changed files with 363 additions and 288 deletions

View File

@@ -22,7 +22,9 @@ import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.RippleDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
@@ -71,7 +73,9 @@ public class NotificationMainView extends LinearLayout implements SwipeHelper.Ca
public void applyColors(IconPalette iconPalette) {
mColorBackground = new ColorDrawable(iconPalette.backgroundColor);
setBackground(mColorBackground);
RippleDrawable rippleDrawable = new RippleDrawable(ColorStateList.valueOf(
iconPalette.secondaryColor), mColorBackground, null);
setBackground(rippleDrawable);
mIconPalette = iconPalette;
}