OSDN Git Service

Fix bug 2236111 - right edge of widget chopped-off while dragging
authorJoe Onorato <joeo@android.com>
Wed, 4 Nov 2009 18:48:32 +0000 (13:48 -0500)
committerJoe Onorato <joeo@android.com>
Wed, 4 Nov 2009 18:48:32 +0000 (13:48 -0500)
By using resolveSize, we're clamping the size we measure to the
size of the screen, so just use our prefered size instead.  Nobody
is going to otherwise limit us, so this value won't be mismatched
with the size we actually get.

src/com/android/launcher2/DragView.java

index 7128ded..7a86273 100644 (file)
@@ -84,9 +84,7 @@ public class DragView extends View implements TweenCallback {
 
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        int widthSize = resolveSize(mBitmap.getWidth(), widthMeasureSpec);
-        int heightSize = resolveSize(mBitmap.getHeight(), heightMeasureSpec);
-        setMeasuredDimension(widthSize, heightSize);
+        setMeasuredDimension(mBitmap.getWidth(), mBitmap.getHeight());
     }
 
     @Override