Merge pull request #833 from mebr1416/master

Day mode by default #825
This commit is contained in:
neslihanturan 2017-08-05 12:55:01 +03:00 committed by GitHub
commit 8ca35c7653
6 changed files with 6 additions and 6 deletions

View file

@ -277,6 +277,6 @@ public class Utils {
}
public static boolean isDarkTheme(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("theme",true);
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("theme",false);
}
}

View file

@ -102,7 +102,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
addCurrentLocationMarker(mapboxMap);
});
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",true)) {
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",false)) {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_dark));
} else {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_light));

View file

@ -17,7 +17,7 @@ public class SettingsActivity extends NavigationBaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// Check prefs on every activity starts
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme",true)) {
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme",false)) {
setTheme(R.style.DarkAppTheme);
} else {
setTheme(R.style.LightAppTheme);

View file

@ -27,7 +27,7 @@ public class BaseActivity extends AppCompatActivity {
@Override
protected void onResume() {
// Restart activity if theme is changed
boolean newTheme = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme",true);
boolean newTheme = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme",false);
if(currentTheme!=newTheme){ //is activity theme changed
Intent intent = getIntent();
finish();

View file

@ -112,7 +112,7 @@ public class SingleUploadFragment extends Fragment {
Timber.d(license);
ArrayAdapter<String> adapter;
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",true)) {
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",false)) {
// dark theme
adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_dropdown_item, licenseItems);
}else {

View file

@ -26,7 +26,7 @@
<CheckBoxPreference
android:title="@string/preference_theme"
android:defaultValue="true"
android:defaultValue="false"
android:summary="@string/preference_theme_summary"
android:key="theme"
/>