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;
|
||||
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
return R.drawable.ic_action_point_add_destination;
|
||||
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return R.drawable.ic_action_intermediate;
|
||||
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
return R.drawable.ic_action_point_add_destination;
|
||||
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return R.drawable.ic_action_search_dark;
|
||||
|
|
|
@ -81,11 +81,17 @@ public class NavStartStopAction extends QuickAction {
|
|||
public int getIconRes(Context context) {
|
||||
if (context instanceof MapActivity) {
|
||||
RoutingHelper helper = ((MapActivity) context).getRoutingHelper();
|
||||
if (helper.isPauseNavigation() || helper.isFollowingMode()) {
|
||||
return R.drawable.ic_action_target;
|
||||
if (!helper.isRoutePlanningMode() && !helper.isFollowingMode()) {
|
||||
return ((MapActivity) context).getMapActions().getRouteMode(null).getSmallIconDark();
|
||||
}
|
||||
return R.drawable.ic_action_start_navigation;
|
||||
return helper.getAppMode().getSmallIconDark();
|
||||
}
|
||||
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