mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Adding fling-to-delete.
- Also fixing issue where the drop target icon changes color slower than the text. Change-Id: I0bfa59da5d202016342f1c3de419ebcafd81ff6f
This commit is contained in:
@@ -18,7 +18,7 @@ package com.android.launcher2;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
@@ -71,6 +71,10 @@ public class ButtonDropTarget extends TextView implements DropTarget, DragContro
|
||||
public void onDrop(DragObject d) {
|
||||
}
|
||||
|
||||
public void onFlingToDelete(DragObject d, int x, int y, PointF vec) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public void onDragEnter(DragObject d) {
|
||||
d.dragView.setColor(mHoverColor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user