mirror of
https://github.com/SoPat712/TrackCovid19.git
synced 2025-08-21 10:18:46 -04:00
small fix
This commit is contained in:
Binary file not shown.
@@ -26,8 +26,8 @@ public class HomeActivity extends AppCompatActivity {
|
||||
private int SPLASH_SCREEN_TIME_OUT = 30000;
|
||||
private Button button;
|
||||
private Handler handler;
|
||||
private int STORAGE_PERMISSION_CODE = 1;
|
||||
private int INTERNET_PERMISSION_CODE = 1;
|
||||
private final int STORAGE_PERMISSION_CODE = 1;
|
||||
private final int INTERNET_PERMISSION_CODE = 1;
|
||||
private Runnable myRunnable;
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -36,8 +37,13 @@ public class SettingsActivity extends AppCompatActivity {
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
if (AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES) {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
darkModeSwitch.setDefaultValue(true);
|
||||
Log.i("aa","set off dark mode");
|
||||
} else {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
darkModeSwitch.setDefaultValue(false);
|
||||
Log.i("aa","set on dark mode");
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -6,7 +6,10 @@
|
||||
|
||||
<SwitchPreference
|
||||
android:key="darkMode"
|
||||
android:title="Dark Mode" />
|
||||
android:title="Dark Mode"
|
||||
android:defaultValue="false"
|
||||
android:summaryOff="Disabled"
|
||||
android:summaryOn="Enabled"/>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user