mirror of
https://github.com/SoPat712/TrackCovid19.git
synced 2025-08-21 18:28:46 -04:00
dark mode bug fixes
This commit is contained in:
6
app/.classpath
Normal file
6
app/.classpath
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
34
app/.project
Normal file
34
app/.project
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>app</name>
|
||||
<comment>Project app created by Buildship.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1606852722445</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
2
app/.settings/org.eclipse.buildship.core.prefs
Normal file
2
app/.settings/org.eclipse.buildship.core.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
connection.project.dir=..
|
||||
eclipse.preferences.version=1
|
@@ -1,7 +1,6 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
@@ -43,6 +42,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Data Imported Successfully",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
public static void hideKeyboardFrom(Activity activity) {
|
||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
//Find the currently focused view, so we can grab the correct window token from it.
|
||||
|
@@ -24,6 +24,8 @@ public class SettingsActivity extends AppCompatActivity {
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
System.out.println("SettingsActivity OnCreate");
|
||||
Log.i("steaass","asdfasdfasfdasdfafs onCretaaa");
|
||||
}
|
||||
|
||||
public static class SettingsFragment extends PreferenceFragmentCompat {
|
||||
@@ -37,17 +39,15 @@ 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");
|
||||
|
||||
darkModeSwitch.setEnabled(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
|
||||
public class NetworkUtils {
|
||||
|
||||
private static final String LOG_TAG = NetworkUtils.class.getSimpleName();
|
||||
private static final String BASE_URL = "https://disease.sh/";
|
||||
private static final String BASE_URL = "https://corona.lmao.ninja/";
|
||||
|
||||
private static Retrofit getRetrofit() {
|
||||
return new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<SwitchPreference
|
||||
android:key="darkMode"
|
||||
android:title="Dark Mode"
|
||||
android:defaultValue="false"
|
||||
|
||||
android:summaryOff="Disabled"
|
||||
android:summaryOn="Enabled"/>
|
||||
|
||||
|
Reference in New Issue
Block a user