Update widget manipulation colors.
Spec:
* Resize frame: https://docs.google.com/presentation/d/1UxdDh8EFhPbdRWRwzjbpgL-j02ew4Ew3eG3XBCeoYdo/edit#slide=id.OeO4S0j
* Drop target bar: https://docs.google.com/presentation/d/1UxdDh8EFhPbdRWRwzjbpgL-j02ew4Ew3eG3XBCeoYdo/edit#slide=id.vXfwHn8
Test: manual
Bug: 187910396
Change-Id: I6fd433796970c428841ee96e45ee4fca1ded3665
Merged-In: I6fd433796970c428841ee96e45ee4fca1ded3665
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index d1cb5b8..23dd3bb 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -48,20 +48,6 @@
public abstract class ButtonDropTarget extends TextView
implements DropTarget, DragController.DragListener, OnClickListener {
- private static final Property<ButtonDropTarget, Integer> TEXT_COLOR =
- new Property<ButtonDropTarget, Integer>(Integer.TYPE, "textColor") {
-
- @Override
- public Integer get(ButtonDropTarget target) {
- return target.getTextColor();
- }
-
- @Override
- public void set(ButtonDropTarget target, Integer value) {
- target.setTextColor(value);
- }
- };
-
private static final int[] sTempCords = new int[2];
private static final int DRAG_VIEW_DROP_DURATION = 285;
private static final float DRAG_VIEW_HOVER_OVER_OPACITY = 0.65f;
@@ -84,15 +70,12 @@
private final int mDrawableSize;
protected CharSequence mText;
- protected ColorStateList mOriginalTextColor;
protected Drawable mDrawable;
private boolean mTextVisible = true;
private PopupWindow mToolTip;
private int mToolTipLocation;
- private AnimatorSet mCurrentColorAnim;
-
public ButtonDropTarget(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
@@ -110,7 +93,6 @@
protected void onFinishInflate() {
super.onFinishInflate();
mText = getText();
- mOriginalTextColor = getTextColors();
setContentDescription(mText);
}
@@ -125,6 +107,7 @@
// drawableLeft and drawableStart.
mDrawable = getContext().getDrawable(resId).mutate();
mDrawable.setBounds(0, 0, mDrawableSize, mDrawableSize);
+ mDrawable.setTintList(getTextColors());
setCompoundDrawablesRelative(mDrawable, null, null, null);
}
@@ -191,12 +174,6 @@
@Override
public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
mActive = !options.isKeyboardDrag && supportsDrop(dragObject.dragInfo);
- mDrawable.setColorFilter(null);
- if (mCurrentColorAnim != null) {
- mCurrentColorAnim.cancel();
- mCurrentColorAnim = null;
- }
- setTextColor(mOriginalTextColor);
setVisibility(mActive ? View.VISIBLE : View.GONE);
mAccessibleDrag = options.isAccessibleDrag;
@@ -317,10 +294,6 @@
mLauncher.getAccessibilityDelegate().handleAccessibleDrop(this, null, null);
}
- public int getTextColor() {
- return getTextColors().getDefaultColor();
- }
-
public void setTextVisible(boolean isVisible) {
CharSequence newText = isVisible ? mText : "";
if (mTextVisible != isVisible || !TextUtils.equals(newText, getText())) {
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index bfa1769..550a399 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -263,7 +263,7 @@
mBackground.setCallback(this);
mBackground.setAlpha(0);
- mGridColor = Themes.getAttrColor(getContext(), R.attr.gridColor);
+ mGridColor = Themes.getAttrColor(getContext(), R.attr.workspaceAccentColor);
mGridVisualizationPadding =
res.getDimensionPixelSize(R.dimen.grid_visualization_cell_spacing);
mGridVisualizationRoundingRadius =