Exemplo n.º 1
0
 public void surfaceCreated(SurfaceHolder holder) {
   if (!running) {
     running = true;
     thread.setMode(Mode.RUNNING);
     thread.start();
   } else {
     thread.resume();
   }
 }
Exemplo n.º 2
0
  public void surfaceDestroyed(SurfaceHolder holder) {
    thread.setMode(Mode.STOPPED);

    boolean retry = true;
    while (retry) {
      try {
        thread.join();
        retry = false;
      } catch (InterruptedException e) {
      }
    }
  }