Develop #5

Merged
SemvdH merged 62 commits from develop into main 2021-01-14 10:55:23 +00:00
Showing only changes of commit 7f56cbe30a - Show all commits

View File

@@ -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();