I am trying to make a view in which i am having 6-7 different images. There is no issue in drwaing only one image on a view, but how to draw multiple images on that view.
Here is my code-
Bitmap img1= BitmapFactory.decodeResource(context.getResources(),
R.drawable.football);
And here is my onDraw() method-
@Override
protected void onDraw(Canvas canvas) {
setBackgroundColor(Color.GREEN);
float hgt=canvas.getHeight();
float wth=canvas.getWidth();
System.out.println("hgt and wt is "+hgt+" "+wth);
if (startMovement) {
left = 0;
right = 0;
startMovement = false;
}
CheckCorner(canvas);
super.onDraw(canvas);
}
The images are moving from top to bottom, and need to be displayed in a row.