Develop #5

Merged
SemvdH merged 62 commits from develop into main 2021-01-14 10:55:23 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 4c09192f9a - Show all commits

View File

@@ -38,7 +38,6 @@ public class MainActivity extends AppCompatActivity implements Refreshable {
*/ */
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
// initialize saved language from sharedPreferences // initialize saved language from sharedPreferences

View File

@@ -108,7 +108,7 @@ public class SettingsFragment extends Fragment {
editor.commit(); editor.commit();
}); });
this.colorBlindMode = view.findViewById(R.id.settingsEyesButton); this.colorBlindMode = view.findViewById(R.id.colourblindSwitch);
this.colorBlindMode.setOnClickListener(view1 -> { this.colorBlindMode.setOnClickListener(view1 -> {
editor.putBoolean("colorBlindModeSwitch", imperialSwitch.isChecked()); editor.putBoolean("colorBlindModeSwitch", imperialSwitch.isChecked());
editor.apply(); editor.apply();
@@ -117,10 +117,12 @@ public class SettingsFragment extends Fragment {
if (colorBlindMode.isChecked()){ if (colorBlindMode.isChecked()){
requireActivity().setTheme(R.style.Theme_NextLocation); requireActivity().setTheme(R.style.Theme_NextLocation);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
getActivity().recreate();
System.out.println("AAN"); System.out.println("AAN");
}else if (!colorBlindMode.isChecked()){ }else if (!colorBlindMode.isChecked()){
requireActivity().setTheme(R.style.Theme_NextLocationNight); requireActivity().setTheme(R.style.Theme_NextLocation);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
getActivity().recreate();
System.out.println("UIT"); System.out.println("UIT");
} }