mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user