tags:

views:

250

answers:

1

hi,

i called canvas.drawBitmap to draw an image, but somehow it's showing up behind/underneath the custom view (or it's background). can someone explain this? thanks.

+1  A: 

The order in which you draw things matters when dealing with canvases. For example,

canvas.drawBitmap(redCircle, 0, 0, null);    
canvas.drawBitmap(blueSquare, 0, 0, null);

will draw the blueSquare on top of the redCircle. If the square is bigger or doesn't have any transparency, the circle might be entirely hidden. Unfortunately, I can't be more specific than that unless you give a bit more information about your specific problem. (Edit the question to provide the code, and leave a comment saying you've done it.)

Steve H
that works. thanks.