user2565010
user2565010

Reputation: 2010

How to (very) quickly refresh an image

I have an ImageView in my Android app that I want to change periodically with a variable frame rate. The only way I have managed to do that is by using the postDelayed function of a handler inside a run() function. This would have worked in theory, but in reality the maximum frame rate I could get was about 4-5 fps. I need a higher framerate (40 to 60 fps).

Can anybody please suggest a solution for refreshing an image faster than this (even if it isn't an imageView)?

Upvotes: 0

Views: 105

Answers (1)

Olsavage
Olsavage

Reputation: 1108

I guess, you need something like game loop. It can be done with SurfaceView. Check this tutorial http://obviam.net/index.php/a-very-basic-the-game-loop-for-android/

Upvotes: 1

Related Questions