Fixing issue where dragview was jagged when scaled.

Change-Id: Ibc4b6e023428f39464f015726a22c2ec5130e63b
This commit is contained in:
Winson Chung 2012-02-23 17:54:58 -08:00
parent 81a05a1366
commit bd7f37acba
1 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ public class DragView extends View {
canvas.drawRect(0, 0, getWidth(), getHeight(), p);
}
if (mPaint == null) {
mPaint = new Paint();
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
mHasDrawn = true;
@ -214,7 +214,7 @@ public class DragView extends View {
public void setAlpha(float alpha) {
super.setAlpha(alpha);
if (mPaint == null) {
mPaint = new Paint();
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
mPaint.setAlpha((int) (255 * alpha));
invalidate();