As far as I know, there are two common ways to draw animated images yourself on the screen: SurfaceView
OR GLSurfaceView
(Android official site).
For the better performance of drawing multiple identical images, my suggestion is to draw images on GLSurfaceView
instead of SurfaceView
.
If the amount of identical images to draw is large, then the frame rate to draw onto SurfaceView
will be affected by the device's computing power (depends on CPU speed). On the other hand, using GLSurfaceView
mostly depends on GPU speed, so I suggested using GLSurfaceView
to draw images.
But if you are not familiar with OpenGL ES. The most efficient way of drawing multiple identical images is to separate your logic statements from images by drawing code segments with another thread. Drawing using drawable.draw(canvas)
or canvas.drawBitmap()
will be fine.
ps. Using GLSurfaceView
will require translating the Drawables to the texture before they can be drawn on GLSurfaceView
.