Removing some methods from the DragSource

This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
This commit is contained in:
Sunny Goyal
2017-10-03 16:17:32 -07:00
parent 3792096688
commit 1ce9c476f7
12 changed files with 21 additions and 123 deletions

View File

@@ -178,7 +178,7 @@ public abstract class ButtonDropTarget extends TextView
@Override
public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
mActive = supportsDrop(dragObject.dragSource, dragObject.dragInfo);
mActive = supportsDrop(dragObject.dragInfo);
mDrawable.setColorFilter(null);
if (mCurrentColorAnim != null) {
mCurrentColorAnim.cancel();
@@ -194,10 +194,10 @@ public abstract class ButtonDropTarget extends TextView
@Override
public final boolean acceptDrop(DragObject dragObject) {
return supportsDrop(dragObject.dragSource, dragObject.dragInfo);
return supportsDrop(dragObject.dragInfo);
}
protected abstract boolean supportsDrop(DragSource source, ItemInfo info);
protected abstract boolean supportsDrop(ItemInfo info);
@Override
public boolean isDropEnabled() {