Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FU

  • Loading branch information...
commit 2abb78fc2385d496f8ee1e5c24f668212492c64f 1 parent 6a3b509
@dua-dua dua-dua authored
View
2  GoldMine/res/values/color.xml
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#000000</color>
+ <color name="gold">#DDDDDD</color>
+ <color name="mine">#CCCCCC</color>
</resources>
View
2  GoldMine/res/values/strings.xml
@@ -17,6 +17,4 @@
<string name="instructions_text">
Do you seriously need instructions? T_T
</string>
-
-
</resources>
View
9 GoldMine/src/no/ntnu/tdt4240/activities/SettingsActivity.java
@@ -3,22 +3,23 @@
import no.ntnu.tdt4240.R;
import android.app.Activity;
import android.os.Bundle;
+import android.preference.PreferenceActivity;
import android.view.Window;
import android.view.WindowManager;
-public class SettingsActivity extends Activity {
+public class SettingsActivity extends PreferenceActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// hide title
- requestWindowFeature(Window.FEATURE_NO_TITLE);
+ //requestWindowFeature(Window.FEATURE_NO_TITLE);
// Hide notification bar
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ //getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
- setContentView(R.layout.game);
+ setContentView(R.layout.settings);
}
View
35 GoldMine/src/no/ntnu/tdt4240/views/GridView.java
@@ -0,0 +1,35 @@
+package no.ntnu.tdt4240.views;
+
+import android.R;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.view.View;
+
+public class GridView extends View {
+
+ private static final int CELL_SIZE = 8;
+ private static final int WIDTH = 480 / CELL_SIZE;
+ private static final int HEIGHT = 480 / CELL_SIZE;
+
+ public GridView(Context context) {
+ super(context);
+ }
+
+ protected void onDraw(Canvas canvas) {
+ Paint background = new Paint();
+ background.setColor(R.color.black);
+
+ Paint gold = new Paint();
+ gold.setColor(R.color.primary_text_light);
+
+ Paint mine = new Paint();
+ mine.setColor(R.color.white);
+
+ canvas.drawRect(0, 0, getWidth(), getHeight(), background);
+
+ for (int i = 0; i < HEIGHT; i++) {
+ }
+ }
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.