Skip to content

Commit

Permalink
Show appropriate dialog titles for Navigation Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-kutz committed Mar 2, 2025
1 parent 39911e3 commit a80be41
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ protected Object getLocationIcon(@NonNull MapActivity mapActivity) {
return mapActivity.getMapLayers().getNavigationLayer().getPointToNavigateIcon();
}

@NonNull
@Override
protected String getDialogTitle(@NonNull Context context) {
return context.getString(R.string.add_destination_point);
}

@NonNull
@Override
protected CharSequence getQuickActionDescription(@NonNull Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ protected Object getLocationIcon(@NonNull MapActivity mapActivity) {
return mapActivity.getMapLayers().getNavigationLayer().getIntermediatePointIcon();
}

@NonNull
@Override
protected String getDialogTitle(@NonNull Context context) {
return context.getString(R.string.add_intermediate_point);
}

@NonNull
@Override
protected CharSequence getQuickActionDescription(@NonNull Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ protected Object getLocationIcon(@NonNull MapActivity mapActivity) {
return mapActivity.getMapLayers().getNavigationLayer().getStartPointIcon();
}

@NonNull
@Override
protected String getDialogTitle(@NonNull Context context) {
return context.getString(R.string.add_start_point);
}

@NonNull
@Override
protected CharSequence getQuickActionDescription(@NonNull Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ protected Object getLocationIcon(@NonNull MapActivity mapActivity) {
return mapActivity.getMapLayers().getNavigationLayer().getPointToNavigateIcon();
}

@NonNull
@Override
protected String getDialogTitle(@NonNull Context context) {
return context.getString(R.string.add_destination_point);
}

@NonNull
@Override
protected CharSequence getQuickActionDescription(@NonNull Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void onLocationSelected(@NonNull LatLon latLon) {
@NonNull
@Override
public String getDialogTitle() {
return mapActivity.getString(R.string.choose_location);
return SelectMapLocationAction.this.getDialogTitle(mapActivity);
}
};
}
Expand All @@ -77,6 +77,11 @@ public String getDialogTitle() {
@Nullable
protected abstract Object getLocationIcon(@NonNull MapActivity mapActivity);

@NonNull
protected String getDialogTitle(@NonNull Context context) {
return context.getString(R.string.choose_location);
}

public boolean isManualLocationSelection() {
return Boolean.parseBoolean(getParameter(KEY_SELECT_LOCATION_MANUALLY, "true"));
}
Expand Down

0 comments on commit a80be41

Please sign in to comment.