Cleaned up LunarLander sample

Change-Id: If2cc44c8312cebce170d07c34c64ea2ce1e5b7ab
This commit is contained in:
Christian Mehlmauer
2010-07-02 16:20:49 +02:00
parent a96f73a683
commit 3eda8fc385
2 changed files with 17 additions and 20 deletions

View File

@@ -21,7 +21,6 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TextView;
import com.example.android.lunarlander.LunarView.LunarThread;

View File

@@ -509,7 +509,7 @@ class LunarView extends SurfaceView implements SurfaceHolder.Callback {
mCanvasHeight = height;
// don't forget to resize the background image
mBackgroundImage = mBackgroundImage.createScaledBitmap(
mBackgroundImage = Bitmap.createScaledBitmap(
mBackgroundImage, width, height, true);
}
}
@@ -539,8 +539,6 @@ class LunarView extends SurfaceView implements SurfaceHolder.Callback {
if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) okStart = true;
if (keyCode == KeyEvent.KEYCODE_S) okStart = true;
boolean center = (keyCode == KeyEvent.KEYCODE_DPAD_UP);
if (okStart
&& (mMode == STATE_READY || mMode == STATE_LOSE || mMode == STATE_WIN)) {
// ready-to-start -> start