Merge "Drag thumbnail fixes / improvements"

This commit is contained in:
Chris Tate
2010-10-14 17:14:07 -07:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 0 deletions

View File

@@ -206860,6 +206860,17 @@
<parameter name="view" type="android.view.View">
</parameter>
</constructor>
<method name="getView"
return="android.view.View"
abstract="false"
native="false"
synchronized="false"
static="false"
final="true"
deprecated="not deprecated"
visibility="public"
>
</method>
<method name="onDrawThumbnail"
return="void"
abstract="false"

View File

@@ -9854,6 +9854,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
mView = new WeakReference<View>(view);
}
final public View getView() {
return mView.get();
}
/**
* Provide the draggable-thumbnail metrics for the operation: the dimensions of
* the thumbnail image itself, and the point within that thumbnail that should
@@ -9932,6 +9936,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
if (token != null) {
Canvas canvas = surface.lockCanvas(null);
try {
canvas.drawColor(0, PorterDuff.Mode.CLEAR);
thumbBuilder.onDrawThumbnail(canvas);
} finally {
surface.unlockCanvasAndPost(canvas);