Back to project page FlashAndroid.
The source code is released under:
GNU General Public License
If you think the Android project FlashAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package flash.android.game; //from www . jav a 2 s. c om import android.content.Context; import android.graphics.Canvas; import android.view.SurfaceHolder; import android.view.SurfaceHolder.Callback; import android.view.SurfaceView; public class AnimView extends SurfaceView implements Callback, Runnable { private boolean mIsRunning = false; private SurfaceHolder mSurfaceHolder = null; private Canvas mCanvas = null; public AnimView(Context context) { super(context); // TODO Auto-generated constructor stub } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub } @Override public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub } @Override public void run() { while (mIsRunning) { // ??????????? synchronized (mSurfaceHolder) { mCanvas = mSurfaceHolder.lockCanvas(); draw(); /** ??????????????????? **/ mSurfaceHolder.unlockCanvasAndPost(mCanvas); } } } private void draw() { } }