How to set a Bitmap image in canvas of my custom View?
Inside your onDraw()
method,
just do
canvas.drawBitmap(myBitmap, 0, 0, null);
myBitmap is your bitmap variable.
0,0 refers to the coordinates to draw at, aka the top left corner.
There are other Apis available, to draw to certain areas etc.
More info can be found here in the api docs.
Alternatively:
extend ImageView instead, and use setImageBitmap(Bitmap src);
method to achieve this.