diff --git a/src/main/java/sae/chuzzle/OptionsActivity.java b/src/main/java/sae/chuzzle/OptionsActivity.java index 9d0bf7d..8841adf 100644 --- a/src/main/java/sae/chuzzle/OptionsActivity.java +++ b/src/main/java/sae/chuzzle/OptionsActivity.java @@ -13,9 +13,7 @@ public class OptionsActivity extends Activity implements CompoundButton.OnCheckedChangeListener, View.OnClickListener { private SharedPreferences prefs; - private CheckBox checkDaltonien; private CheckBox checkHard; - private Button btnRetour; @@ -26,23 +24,20 @@ public class OptionsActivity extends Activity prefs = getSharedPreferences("chuzzle_prefs", MODE_PRIVATE); - checkDaltonien = findViewById(R.id.checkDaltonien); + checkHard = findViewById(R.id.checkHard); btnRetour = findViewById(R.id.btnBack); - checkDaltonien.setChecked(prefs.getBoolean("daltonien", false)); checkHard.setChecked(prefs.getBoolean("hard_mode", false)); - checkDaltonien.setOnCheckedChangeListener(this); + checkHard.setOnCheckedChangeListener(this); btnRetour.setOnClickListener(this); } @Override public void onCheckedChanged(CompoundButton bouton, boolean estCoche) { - if (bouton == checkDaltonien) { - prefs.edit().putBoolean("daltonien", estCoche).apply(); - } else if (bouton == checkHard) { + if (bouton == checkHard) { prefs.edit().putBoolean("hard_mode", estCoche).apply(); } } diff --git a/src/main/res/layout/activity_options.xml b/src/main/res/layout/activity_options.xml index 92a86aa..23b7edc 100644 --- a/src/main/res/layout/activity_options.xml +++ b/src/main/res/layout/activity_options.xml @@ -14,31 +14,7 @@ android:gravity="center" android:layout_marginBottom="64dp"/> - - - - - -