Canvas canvas=myHolder.lockCanvas();
canvas.drawRGB(02, 02, 150); /*I do not want to use RGB, I want to set my own background image*/
//How can I implement that method?
if(x!=0 && y!=0) {
canvas.drawBitmap(skull_normal, x-(skull_normal.getWidth()/2), y-(skull_normal.getHeight()/2), null);
}
Creating image background for Android?
Page 1 of 12 Replies - 1966 Views - Last Post: 27 December 2012 - 05:12 PM
#1
Creating image background for Android?
Posted 18 December 2012 - 09:35 AM
I know how to create a background image for an XML layout, but that is not my question. I want to set my own background image for my Graphics class. (I am not using an XML Layout);
Replies To: Creating image background for Android?
#2
Re: Creating image background for Android?
Posted 22 December 2012 - 09:44 PM
Unless I am completely misunderstanding you, you can just do what you've done with drawBitmap(). You draw the background image, then whatever you want on top of it...
#3
Re: Creating image background for Android?
Posted 27 December 2012 - 05:12 PM
In your onDraw method try using: this.setBackgroundDrawable
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|