The drag/drop ApiDemo now uses a global drag, not local-only

Showing off the new View.DRAG_FLAG_GLOBAL feature.

Change-Id: I3f857974a7334e00a891d93a70ecc7a85378cd68
This commit is contained in:
Christopher Tate
2011-01-28 18:04:54 -08:00
parent f1458cdb93
commit 796df3b02e

View File

@@ -132,7 +132,7 @@ public class DraggableDot extends View {
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
ClipData data = ClipData.newPlainText("dot", "Dot : " + v.toString()); ClipData data = ClipData.newPlainText("dot", "Dot : " + v.toString());
v.startDrag(data, new ANRShadowBuilder(v, mAnrType == ANR_SHADOW), v.startDrag(data, new ANRShadowBuilder(v, mAnrType == ANR_SHADOW),
(Object)v, 0); (Object)v, View.DRAG_FLAG_GLOBAL);
return true; return true;
} }
}); });