Suppress auto-closing drawer and add ripple effect on spring load roots.
Bug: 28865182
Change-Id: Ief7967e33b9a0d7e94a667172121d8007f78115b
diff --git a/src/com/android/documentsui/ItemDragListener.java b/src/com/android/documentsui/ItemDragListener.java
index 2c018f8..66b94fc 100644
--- a/src/com/android/documentsui/ItemDragListener.java
+++ b/src/com/android/documentsui/ItemDragListener.java
@@ -17,6 +17,7 @@
package com.android.documentsui;
import android.content.ClipData;
+import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.DragEvent;
import android.view.View;
@@ -62,6 +63,7 @@
handleEnteredEvent(v);
return true;
case DragEvent.ACTION_DRAG_LOCATION:
+ handleLocationEvent(v, event.getX(), event.getY());
return true;
case DragEvent.ACTION_DRAG_EXITED:
case DragEvent.ACTION_DRAG_ENDED:
@@ -83,6 +85,13 @@
mHoverTimer.schedule(task, ViewConfiguration.getLongPressTimeout());
}
+ private void handleLocationEvent(View v, float x, float y) {
+ Drawable background = v.getBackground();
+ if (background != null) {
+ background.setHotspot(x, y);
+ }
+ }
+
private void handleExitedEndedEvent(View v) {
mDragHost.setDropTargetHighlight(v, false);