Develop #5
@@ -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
|
||||||
|
|||||||
@@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user