Skip to content

Instantly share code, notes, and snippets.

@aconbere
Created April 8, 2011 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aconbere/910742 to your computer and use it in GitHub Desktop.
Save aconbere/910742 to your computer and use it in GitHub Desktop.
setRunning symbol not found
class EscapeThread extends Thread {
public SurfaceHolder surfaceHolder;
public Context context;
private boolean running;
public EscapeThread(SurfaceHolder holder, Context cont) {
this.surfaceHolder = holder;
this.context = cont;
this.running = false;
}
public void setRunning(boolean b) {
this.running = b;
}
private void doDraw(Canvas canvas) {
// Paint paint = new Paint();
// paint.setAntiAlias(true);
// paint.setARGB(255, 0, 255, 0);
//
// RectF rect = new RectF(100, 100, 100, 100);
//
// canvas.drawRect(rect, paint);
}
@Override
public void run() {
while (running) {
Canvas c = null;
try {
c = surfaceHolder.lockCanvas(null);
synchronized (surfaceHolder) {
doDraw(c);
}
} finally {
if (c != null) {
surfaceHolder.unlockCanvasAndPost(c);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment