How can I draw image from a class? In the main I create a object with a random number, in the paint class I want to handle more stuff not just paint, because of that i think it´s best that i have a another class that draws my picture on top off the "main" background with its buttons etc..
I have read about canvas and bitmap. But cant figure out how to implement it, because I also want to change the picture i a method in this class later in my game.
Should the new class extend ActionBarActivity
or View
??
Can just some helpful soul give some example to guide me a little..
example of the class I create objects of:
public class paint {
public Svar(int aNumber) {
if (aNumber == 1) {
//Paint something
}
if (aNumber == 2) {
//Paint something else
}
if (aNumber == 3) {
//Paint something else
}
if (aNumber == 4) {
//Paint something else
}
if (aNumber == 5) {
//Paint something else
}
}
}