Skip to content Skip to sidebar Skip to footer

Run Surfaceview Off Ui Thread

My surfraceview is where the majority of my application is and I would like to reduce its lag, thus I have been told to take it off the UI Thread. Is it possible to run a SurfaceV

Solution 1:

While it is possible to draw into a SurfaceView from an AsyncTask it is not recommended. AsyncTasks can run in a serial queue so you would likely block other tasks. Instead just use a Thread. The SDK contains a sample app called LunarLander which shows how to do this.


Post a Comment for "Run Surfaceview Off Ui Thread"