Merge pull request #571 from neslihanturan/switchMapThemeNoConflict

Remove conflicts
This commit is contained in:
Josephine Lim 2017-05-14 13:30:05 +02:00 committed by GitHub
commit 04e5432f13
2 changed files with 8 additions and 0 deletions

View file

@ -2,6 +2,7 @@ package fr.free.nrw.commons.nearby;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
@ -93,6 +94,11 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
});
}
});
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",true)) {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_dark));
} else {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_light));
}
setHasOptionsMenu(false);

View file

@ -170,5 +170,7 @@ Tap this message (or hit back) to skip this step.</string>
<string name="beta_opt_in_link">https://play.google.com/apps/testing/fr.free.nrw.commons</string>
<string name="use_wikidata">Use Wikidata</string>
<string name="use_wikidata_summary">(Warning: disabling this may cause large mobile data consumption)</string>
<string name="map_theme_light">mapbox://styles/mapbox/traffic-day-v2</string>
<string name="map_theme_dark">mapbox://styles/mapbox/traffic-night-v2</string>
<string name="mapbox_commons_app_token">pk.eyJ1IjoibWFza2FyYXZpdmVrIiwiYSI6ImNqMmxvdzFjMTAwMHYzM283ZWM3eW5tcDAifQ.ib5SZ9EVjwJe6GSKve0bcg</string>
</resources>