icons for screen rotation mode
BIN
OsmAnd/res/drawable-hdpi/map_compass_bearing.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_compass_bearing_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_compass_niu.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_compass_nui_template.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_compass_nui_white.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_compass_nui_white_template.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
OsmAnd/res/drawable-large/map_compass_bearing.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_compass_bearing_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_compass_niu.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-large/map_compass_nui_white.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
|
@ -8,6 +8,7 @@ import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.binary.RouteDataObject;
|
import net.osmand.binary.RouteDataObject;
|
||||||
import net.osmand.plus.*;
|
import net.osmand.plus.*;
|
||||||
import net.osmand.plus.OsmAndLocationProvider.GPSInfo;
|
import net.osmand.plus.OsmAndLocationProvider.GPSInfo;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||||
import net.osmand.plus.routing.RouteDirectionInfo;
|
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||||
|
@ -283,6 +284,11 @@ public class MapInfoWidgetsFactory {
|
||||||
|
|
||||||
public ImageViewWidget createCompassView(final MapActivity map){
|
public ImageViewWidget createCompassView(final MapActivity map){
|
||||||
final OsmandMapTileView view = map.getMapView();
|
final OsmandMapTileView view = map.getMapView();
|
||||||
|
final OsmandApplication app = map.getMyApplication();
|
||||||
|
final Drawable compassNiu = map.getResources().getDrawable(R.drawable.map_compass_niu);
|
||||||
|
final Drawable compassNiuWhite = map.getResources().getDrawable(R.drawable.map_compass_niu_white);
|
||||||
|
final Drawable compassBearing = map.getResources().getDrawable(R.drawable.map_compass_bearing);
|
||||||
|
final Drawable compassBearingWhite = map.getResources().getDrawable(R.drawable.map_compass_bearing_white);
|
||||||
final Drawable compass = map.getResources().getDrawable(R.drawable.map_compass);
|
final Drawable compass = map.getResources().getDrawable(R.drawable.map_compass);
|
||||||
final Drawable compassWhite = map.getResources().getDrawable(R.drawable.map_compass_white);
|
final Drawable compassWhite = map.getResources().getDrawable(R.drawable.map_compass_white);
|
||||||
final int mw = (int) compass.getMinimumWidth() ;
|
final int mw = (int) compass.getMinimumWidth() ;
|
||||||
|
@ -303,7 +309,13 @@ public class MapInfoWidgetsFactory {
|
||||||
boolean nightMode = drawSettings != null && drawSettings.isNightMode();
|
boolean nightMode = drawSettings != null && drawSettings.isNightMode();
|
||||||
if(nightMode != this.nm) {
|
if(nightMode != this.nm) {
|
||||||
this.nm = nightMode;
|
this.nm = nightMode;
|
||||||
setImageDrawable(nightMode ? compassWhite : compass);
|
if (app.getSetings().ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE) {
|
||||||
|
setImageDrawable(nightMode ? compassNiuWhite : compassNiu);
|
||||||
|
} else if (app.getSetings().ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING) {
|
||||||
|
setImageDrawable(nightMode ? compassBearingWhite : compassBearing);
|
||||||
|
} else {
|
||||||
|
setImageDrawable(nightMode ? compassWhite : compass);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(view.getRotate() != cachedRotate) {
|
if(view.getRotate() != cachedRotate) {
|
||||||
|
|