DrawableView
DrawableView copied to clipboard
Can we set a bitmap as the canvas background?
Sorry, did not have much time now to go through but does it provide a method to set an image as the canvas background so we can draw over that image?
I have a solution.
- You can set background like this: drawableView.setBackground(new BitmapDrawable(bitmap));
- Paint others on the background.
- Then obtain bitmap call: drawableView.obtainBitmap(bitmap.copy(Bitmap.Config.ARGB_8888, true)); Note: If you want clear the canvas, you can call: drawableView.setBackground(null); drawableView.clear(); Hope to help you.