From 134fada434cae8dc5a00b91cb5ff0541de94ea64 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Mon, 10 Jan 2011 20:45:20 -0800 Subject: [PATCH] API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly" startDrag() that crosses application boundaries will remain @hide until we get more of the surrounding behaviors nailed down. Drag-and-drop demo updated to only show app-local drag operations pro tem. Change-Id: I9cdcd132c1aae45bc472e70293b7187b4cba9bca --- samples/ApiDemos/res/layout/drag_layout.xml | 12 ------------ samples/ApiDemos/res/values/attrs.xml | 1 - .../example/android/apis/view/DragAndDropDemo.java | 2 -- .../com/example/android/apis/view/DraggableDot.java | 9 ++------- 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/samples/ApiDemos/res/layout/drag_layout.xml b/samples/ApiDemos/res/layout/drag_layout.xml index 0dd193d03..4e509c4d1 100644 --- a/samples/ApiDemos/res/layout/drag_layout.xml +++ b/samples/ApiDemos/res/layout/drag_layout.xml @@ -62,18 +62,6 @@ dot:anr="drop" /> - - - diff --git a/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java b/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java index 7e8c076e4..f3a352197 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java @@ -39,8 +39,6 @@ public class DragAndDropDemo extends Activity { dot.setReportView(text); dot = (DraggableDot) findViewById(R.id.drag_dot_3); dot.setReportView(text); - dot = (DraggableDot) findViewById(R.id.drag_dot_4); - dot.setReportView(text); mResultText = (TextView) findViewById(R.id.drag_result_text); mResultText.setOnDragListener(new View.OnDragListener() { diff --git a/samples/ApiDemos/src/com/example/android/apis/view/DraggableDot.java b/samples/ApiDemos/src/com/example/android/apis/view/DraggableDot.java index 6d6e75878..d1adca4d6 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/DraggableDot.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/DraggableDot.java @@ -48,7 +48,6 @@ public class DraggableDot extends View { int mRadius; int mAnrType; - boolean mLocalOnly; CharSequence mLegend; static final int ANR_NONE = 0; @@ -123,21 +122,17 @@ public class DraggableDot extends View { case R.styleable.DraggableDot_anr: { mAnrType = a.getInt(attr, 0); } break; - - case R.styleable.DraggableDot_localOnly: { - mLocalOnly = a.getBoolean(attr, false); - } break; } } Log.i(TAG, "DraggableDot @ " + this + " : radius=" + mRadius + " legend='" + mLegend - + "' anr=" + mAnrType + " local=" + mLocalOnly); + + "' anr=" + mAnrType); setOnLongClickListener(new View.OnLongClickListener() { public boolean onLongClick(View v) { ClipData data = ClipData.newPlainText("dot", null, "Dot : " + v.toString()); v.startDrag(data, new ANRShadowBuilder(v, mAnrType == ANR_SHADOW), - mLocalOnly, (Object)v); + (Object)v, 0); return true; } });