Don't hardcode 320x480 size in the FingerPaint API demo.
Change-Id: I4de9ce1e52dda68bf4c3ab7fbd9987ca6d5548a0
This commit is contained in:
@@ -68,8 +68,6 @@ public class FingerPaint extends GraphicsActivity
|
|||||||
public MyView(Context c) {
|
public MyView(Context c) {
|
||||||
super(c);
|
super(c);
|
||||||
|
|
||||||
mBitmap = Bitmap.createBitmap(320, 480, Bitmap.Config.ARGB_8888);
|
|
||||||
mCanvas = new Canvas(mBitmap);
|
|
||||||
mPath = new Path();
|
mPath = new Path();
|
||||||
mBitmapPaint = new Paint(Paint.DITHER_FLAG);
|
mBitmapPaint = new Paint(Paint.DITHER_FLAG);
|
||||||
}
|
}
|
||||||
@@ -77,6 +75,8 @@ public class FingerPaint extends GraphicsActivity
|
|||||||
@Override
|
@Override
|
||||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||||
super.onSizeChanged(w, h, oldw, oldh);
|
super.onSizeChanged(w, h, oldw, oldh);
|
||||||
|
mBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
|
||||||
|
mCanvas = new Canvas(mBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user