development
Revision | bff338e3e95c35c619e8cba4f3c8154665500e3f (tree) |
---|---|
Zeit | 2011-01-08 09:38:12 |
Autor | Christopher Tate <ctate@goog...> |
Commiter | Android Git Automerger |
am 7f68ce1a: Rename drag "thumbnail" to the drag "shadow"
* commit '7f68ce1a1913bb8ffa13cf518b0daaa1bcf5eb4d':
@@ -52,7 +52,7 @@ public class DraggableDot extends View { | ||
52 | 52 | CharSequence mLegend; |
53 | 53 | |
54 | 54 | static final int ANR_NONE = 0; |
55 | - static final int ANR_THUMBNAIL = 1; | |
55 | + static final int ANR_SHADOW = 1; | |
56 | 56 | static final int ANR_DROP = 2; |
57 | 57 | |
58 | 58 | void sleepSixSeconds() { |
@@ -63,21 +63,21 @@ public class DraggableDot extends View { | ||
63 | 63 | } while (SystemClock.uptimeMillis() < start + 6000); |
64 | 64 | } |
65 | 65 | |
66 | - // Thumbnail builder that can ANR if desired | |
67 | - class ANRThumbBuilder extends DragThumbnailBuilder { | |
66 | + // Shadow builder that can ANR if desired | |
67 | + class ANRShadowBuilder extends DragShadowBuilder { | |
68 | 68 | boolean mDoAnr; |
69 | 69 | |
70 | - public ANRThumbBuilder(View view, boolean doAnr) { | |
70 | + public ANRShadowBuilder(View view, boolean doAnr) { | |
71 | 71 | super(view); |
72 | 72 | mDoAnr = doAnr; |
73 | 73 | } |
74 | 74 | |
75 | 75 | @Override |
76 | - public void onDrawThumbnail(Canvas canvas) { | |
76 | + public void onDrawShadow(Canvas canvas) { | |
77 | 77 | if (mDoAnr) { |
78 | 78 | sleepSixSeconds(); |
79 | 79 | } |
80 | - super.onDrawThumbnail(canvas); | |
80 | + super.onDrawShadow(canvas); | |
81 | 81 | } |
82 | 82 | } |
83 | 83 |
@@ -136,7 +136,7 @@ public class DraggableDot extends View { | ||
136 | 136 | setOnLongClickListener(new View.OnLongClickListener() { |
137 | 137 | public boolean onLongClick(View v) { |
138 | 138 | ClipData data = ClipData.newPlainText("dot", null, "Dot : " + v.toString()); |
139 | - v.startDrag(data, new ANRThumbBuilder(v, mAnrType == ANR_THUMBNAIL), | |
139 | + v.startDrag(data, new ANRShadowBuilder(v, mAnrType == ANR_SHADOW), | |
140 | 140 | mLocalOnly, (Object)v); |
141 | 141 | return true; |
142 | 142 | } |