Methods Summary |
---|
public void | SetButtonView(android.widget.Button _buttonRetry)A reference to the button to start game over.
mButtonRetry = _buttonRetry;
// mButtonRestart = _buttonRestart;
|
public void | SetTextView(android.widget.TextView textView)
mTextView = textView;
|
public com.example.android.jetboy.JetBoyView$JetBoyThread | getThread()Fetches the animation thread corresponding to this LunarView.
return thread;
|
public void | onWindowFocusChanged(boolean hasWindowFocus)Standard window-focus override. Notice focus lost so we can pause on
focus lost. e.g. user switches to take a call.
if (!hasWindowFocus) {
if (thread != null)
thread.pause();
}
|
public void | setTimerView(android.widget.TextView tv)Pass in a reference to the timer view widget so we can update it from here.
mTimerView = tv;
|
public void | surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height)
thread.setSurfaceSize(width, height);
|
public void | surfaceCreated(android.view.SurfaceHolder arg0)
// start the thread here so that we don't busy-wait in run()
// waiting for the surface to be created
thread.setRunning(true);
thread.start();
|
public void | surfaceDestroyed(android.view.SurfaceHolder arg0)
boolean retry = true;
thread.setRunning(false);
while (retry) {
try {
thread.join();
retry = false;
} catch (InterruptedException e) {
}
}
|