fix - return cut usage for map_ icons

This commit is contained in:
madwasp79 2019-06-26 15:09:40 +03:00
parent 5e0a3ecabe
commit ca37eb40a5
5 changed files with 7 additions and 4 deletions

View file

@ -11,6 +11,9 @@
Thx - Hardy
-->
<string name="app_mode_personal_transporter">Personal transporter</string>
<string name="app_mode_monowheel">Monowheel</string>
<string name="app_mode_scooter">Scooter</string>
<string name="shared_string_min_speed">Min. speed</string>
<string name="shared_string_max_speed">Max. speed</string>
<string name="default_speed_setting_title">Default speed</string>

View file

@ -215,7 +215,7 @@ public class ApplicationMode {
public ApplicationModeBuilder icon(int iconRes, int iconMapRes, String iconResName) {
try {
applicationMode.iconResName = iconResName;
applicationMode.iconMapRes = iconRes;
applicationMode.iconMapRes = iconMapRes;
applicationMode.iconRes = iconRes;
} catch (Exception e) {

View file

@ -661,7 +661,7 @@ public class PlanRouteFragment extends BaseOsmAndFragment implements OsmAndLocat
if (mapActivity != null) {
final ImageButton appModesBtn = (ImageButton) mapActivity.findViewById(R.id.snap_to_road_image_button);
appModesBtn.setBackgroundResource(nightMode ? R.drawable.btn_circle_night : R.drawable.btn_circle);
appModesBtn.setImageDrawable(getActiveIcon(planRouteContext.getSnappedMode().getIconRes()));
appModesBtn.setImageDrawable(getActiveIcon(planRouteContext.getSnappedMode().getMapIconRes()));
appModesBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

View file

@ -805,7 +805,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
ImageButton snapToRoadBtn = (ImageButton) mapActivity.findViewById(R.id.snap_to_road_image_button);
snapToRoadBtn.setBackgroundResource(nightMode ? R.drawable.btn_circle_night : R.drawable.btn_circle);
snapToRoadBtn.setImageDrawable(getIcon(appMode.getIconRes(), appMode.getIconColorInfo().getColor(nightMode)));
snapToRoadBtn.setImageDrawable(getIcon(appMode.getMapIconRes(), appMode.getIconColorInfo().getColor(nightMode)));
snapToRoadBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

View file

@ -796,7 +796,7 @@ public class MapControlsLayer extends OsmandMapLayer {
compassHud.forceHideCompass = forceHideCompass;
compassHud.updateVisibility(!forceHideCompass && shouldShowCompass());
if (layersHud.setIconResId(settings.getApplicationMode().getIconRes())) {
if (layersHud.setIconResId(settings.getApplicationMode().getMapIconRes())) {
layersHud.update(app, isNight);
}
layersHud.updateVisibility(!routeDialogOpened && !trackDialogOpened && !isInMeasurementToolMode() && !isInPlanRouteMode()