Merge pull request #4586 from osmandapp/quick_action_fix
Quick action fix
This commit is contained in:
commit
6adc66b7b4
2 changed files with 11 additions and 5 deletions
|
@ -377,13 +377,13 @@ public class QuickActionFactory {
|
||||||
return R.drawable.ic_layer_bottom_dark;
|
return R.drawable.ic_layer_bottom_dark;
|
||||||
|
|
||||||
case NavAddDestinationAction.TYPE:
|
case NavAddDestinationAction.TYPE:
|
||||||
return R.drawable.ic_action_target;
|
return R.drawable.ic_action_point_add_destination;
|
||||||
|
|
||||||
case NavAddFirstIntermediateAction.TYPE:
|
case NavAddFirstIntermediateAction.TYPE:
|
||||||
return R.drawable.ic_action_intermediate;
|
return R.drawable.ic_action_intermediate;
|
||||||
|
|
||||||
case NavReplaceDestinationAction.TYPE:
|
case NavReplaceDestinationAction.TYPE:
|
||||||
return R.drawable.ic_action_target;
|
return R.drawable.ic_action_point_add_destination;
|
||||||
|
|
||||||
case NavAutoZoomMapAction.TYPE:
|
case NavAutoZoomMapAction.TYPE:
|
||||||
return R.drawable.ic_action_search_dark;
|
return R.drawable.ic_action_search_dark;
|
||||||
|
|
|
@ -81,11 +81,17 @@ public class NavStartStopAction extends QuickAction {
|
||||||
public int getIconRes(Context context) {
|
public int getIconRes(Context context) {
|
||||||
if (context instanceof MapActivity) {
|
if (context instanceof MapActivity) {
|
||||||
RoutingHelper helper = ((MapActivity) context).getRoutingHelper();
|
RoutingHelper helper = ((MapActivity) context).getRoutingHelper();
|
||||||
if (helper.isPauseNavigation() || helper.isFollowingMode()) {
|
if (!helper.isRoutePlanningMode() && !helper.isFollowingMode()) {
|
||||||
return R.drawable.ic_action_target;
|
return ((MapActivity) context).getMapActions().getRouteMode(null).getSmallIconDark();
|
||||||
}
|
}
|
||||||
return R.drawable.ic_action_start_navigation;
|
return helper.getAppMode().getSmallIconDark();
|
||||||
}
|
}
|
||||||
return super.getIconRes(context);
|
return super.getIconRes(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isActionWithSlash(OsmandApplication application) {
|
||||||
|
RoutingHelper helper = application.getRoutingHelper();
|
||||||
|
return helper.isPauseNavigation() || helper.isFollowingMode();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue