Reputation: 2010
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
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