Button be working now
This commit is contained in:
@@ -46,6 +46,7 @@ public class SettingsFragment extends Fragment {
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
editor = getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE).edit();
|
editor = getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE).edit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -109,8 +110,10 @@ public class SettingsFragment extends Fragment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.colorBlindMode = view.findViewById(R.id.colourblindSwitch);
|
this.colorBlindMode = view.findViewById(R.id.colourblindSwitch);
|
||||||
|
this.colorBlindMode.setChecked(sharedPreferences.getBoolean("colorBlindModeSwitch", false));
|
||||||
|
|
||||||
this.colorBlindMode.setOnClickListener(view1 -> {
|
this.colorBlindMode.setOnClickListener(view1 -> {
|
||||||
editor.putBoolean("colorBlindModeSwitch", imperialSwitch.isChecked());
|
editor.putBoolean("colorBlindModeSwitch", colorBlindMode.isChecked());
|
||||||
editor.apply();
|
editor.apply();
|
||||||
editor.commit();
|
editor.commit();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user