- public void setOptions(Bundle options) {
- int size = options.getInt("size");
- int difficulty = options.getInt("difficulty");
- boolean gravity = options.getBoolean("gravity");
- boolean timeCounter = options.getBoolean("timeCounter");
+ public void setOptions() {
+ SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
+
+ // FIXME: handle NumberFormatException here?
+ int size = Integer.parseInt(sharedPref.getString("pref_size", "1"));
+ int difficulty = Integer.parseInt(sharedPref.getString("pref_diff", "1"));
+ boolean gravity = sharedPref.getBoolean("pref_grav", true);
+ boolean timeCounter = sharedPref.getBoolean("pref_time", true);