diff options
author | Tony Wickham <twickham@google.com> | 2015-10-01 13:04:22 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-10-05 10:58:15 -0700 |
commit | 9aae47f8a6e23f1805ee3d44512fc1f80286e6dd (patch) | |
tree | d27a147f70bcea483fd3e15917a0145a7997d7b4 /src/com/android/launcher3/ButtonDropTarget.java | |
parent | b99d74bb0589dcbaf8167af60fd29be0b42f3139 (diff) | |
download | android_packages_apps_Trebuchet-9aae47f8a6e23f1805ee3d44512fc1f80286e6dd.tar.gz android_packages_apps_Trebuchet-9aae47f8a6e23f1805ee3d44512fc1f80286e6dd.tar.bz2 android_packages_apps_Trebuchet-9aae47f8a6e23f1805ee3d44512fc1f80286e6dd.zip |
Added 'Cancel' drop target from all apps and widget picker.
- Reuse DeleteDropTarget since it's the same effect, but with "Cancel"
instead of "Remove" if supportsDeleteDropTarget() returns false.
- Rename related strings (but not their values)
Bug: 24104015
Bug: 24099531
Change-Id: Ia9fbcaa17bb17f7aa31df1f830298da01544c178
Diffstat (limited to 'src/com/android/launcher3/ButtonDropTarget.java')
-rw-r--r-- | src/com/android/launcher3/ButtonDropTarget.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java index a19f00d1f..4b94a1ab6 100644 --- a/src/com/android/launcher3/ButtonDropTarget.java +++ b/src/com/android/launcher3/ButtonDropTarget.java @@ -65,6 +65,8 @@ public abstract class ButtonDropTarget extends TextView protected ColorStateList mOriginalTextColor; protected Drawable mDrawable; + protected DeviceProfile mDeviceProfile; + private AnimatorSet mCurrentColorAnim; @Thunk ColorMatrix mSrcFilter, mDstFilter, mCurrentFilter; @@ -84,8 +86,8 @@ public abstract class ButtonDropTarget extends TextView mOriginalTextColor = getTextColors(); // Remove the text in the Phone UI in landscape - DeviceProfile grid = ((Launcher) getContext()).getDeviceProfile(); - if (grid.isVerticalBarLayout()) { + mDeviceProfile = ((Launcher) getContext()).getDeviceProfile(); + if (mDeviceProfile.isVerticalBarLayout()) { setText(""); } } @@ -193,7 +195,7 @@ public abstract class ButtonDropTarget extends TextView } @Override - public final void onDragStart(DragSource source, ItemInfo info, int dragAction) { + public void onDragStart(DragSource source, ItemInfo info, int dragAction) { mActive = supportsDrop(source, info); mDrawable.setColorFilter(null); if (mCurrentColorAnim != null) { |