0

I dont know how these kind of "all frames in one image" images are called. Please, can you tell me how these images are called?

I can't find any info

NullPointerException
  • 36,107
  • 79
  • 222
  • 382

2 Answers2

0

Use a canvas, drawing an image in the onDraw() function, and setting a new image to be drawn in the update function each time.

For a detailed tutorial, look at this: http://jmsliu.com/2306/android-canvas-example-draw-sprite-sheet-animation-on-canvas.html

EDIT: Oops, paid tutorial! Well, try this instead. For using the canvas to make an animation: How to animate a path on canvas - android

You don't want to animate a path, but draw images. Use this answer: draw object/image on canvas

Now, instead of transformations to the path in onDraw(), just keep drawing the next image in the series.

Community
  • 1
  • 1
vipluv
  • 607
  • 5
  • 8
-2

They're called spritesheets.

I don't have any info on how to animate them on an android platform though.

Thomas
  • 432
  • 3
  • 13