diff options
| author | rsudev <rasch@munin-soft.de> | 2013-09-13 07:47:00 +0200 |
|---|---|---|
| committer | rsudev <rasch@munin-soft.de> | 2013-09-13 07:47:00 +0200 |
| commit | 3032c32be5ba8c19eeb02c1e6d0dce3db307d511 (patch) | |
| tree | bc19b7eb9abd981f021cb9db9f20496192a16292 /main/src | |
| parent | e150d39ab061d08455a1d75bec811fd322a211b6 (diff) | |
| download | cgeo-3032c32be5ba8c19eeb02c1e6d0dce3db307d511.zip cgeo-3032c32be5ba8c19eeb02c1e6d0dce3db307d511.tar.gz cgeo-3032c32be5ba8c19eeb02c1e6d0dce3db307d511.tar.bz2 | |
Implements #3220, Feature request: Show mapsforge-map "bigger" on high-res-displays
Made the mapsforge textscale setting follow the device dpi, if so wanted, default true.
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java | 5 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/settings/Settings.java | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java index aa11405..dc4e82c 100644 --- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java +++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java @@ -1,7 +1,6 @@ package cgeo.geocaching.maps.mapsforge; import cgeo.geocaching.R; -import cgeo.geocaching.settings.Settings; import cgeo.geocaching.geopoint.Viewport; import cgeo.geocaching.maps.CachesOverlay; import cgeo.geocaching.maps.PositionOverlay; @@ -15,6 +14,7 @@ import cgeo.geocaching.maps.interfaces.MapViewImpl; import cgeo.geocaching.maps.interfaces.OnMapDragListener; import cgeo.geocaching.maps.interfaces.OverlayImpl; import cgeo.geocaching.maps.interfaces.OverlayImpl.OverlayType; +import cgeo.geocaching.settings.Settings; import cgeo.geocaching.utils.Log; import org.apache.commons.lang3.StringUtils; @@ -46,6 +46,9 @@ public class MapsforgeMapView extends MapView implements MapViewImpl { public MapsforgeMapView(Context context, AttributeSet attrs) { super(context, attrs); gestureDetector = new GestureDetector(context, new GestureListener()); + if (Settings.isScaleMapsforgeText()) { + this.setTextScale(getResources().getDisplayMetrics().density); + } } @Override diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java index 71c6d4a..680e38f 100644 --- a/main/src/cgeo/geocaching/settings/Settings.java +++ b/main/src/cgeo/geocaching/settings/Settings.java @@ -441,6 +441,10 @@ public final class Settings { return MapsforgeMapProvider.isValidMapFile(mapFileIn); } + public static boolean isScaleMapsforgeText() { + return getBoolean(R.string.pref_mapsforge_scale_text, true); + } + public static CoordInputFormatEnum getCoordInputFormat() { return CoordInputFormatEnum.fromInt(getInt(R.string.pref_coordinputformat, 0)); } |
