refactored const

This commit is contained in:
Chumva 2018-02-16 16:20:33 +02:00
parent 56e2912b39
commit bebfb21b78
3 changed files with 4 additions and 4 deletions

View file

@ -507,7 +507,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
}
if (nearbyTransportStopRoutes != null && nearbyTransportStopRoutes.size() > 0) {
String nearInDistance = getMyApplication().getString(R.string.transport_nearby_routes) + " "
+ OsmAndFormatter.getFormattedDistance(TransportStopController.SHOW_STOPS_RADIUS_IN_METERS, getMyApplication());
+ OsmAndFormatter.getFormattedDistance(TransportStopController.SHOW_STOPS_RADIUS_METERS, getMyApplication());
nearbRoutesWithinTv.setText(nearInDistance);
nearbyTransportStopRoutesGrid.setAdapter(createTransportStopRouteAdapter(nearbyTransportStopRoutes));
nearbyTransportStopRoutesGrid.setVisibility(View.VISIBLE);

View file

@ -310,7 +310,7 @@ public class MenuBuilder {
CollapsableView collapsableView = getCollapsableTransportStopRoutesView(view.getContext(), false, true);
if (collapsableView != null) {
String routesWithingDistance = app.getString(R.string.transport_nearby_routes_within) + " " + OsmAndFormatter.getFormattedDistance(TransportStopController.SHOW_STOPS_RADIUS_IN_METERS,app);
String routesWithingDistance = app.getString(R.string.transport_nearby_routes_within) + " " + OsmAndFormatter.getFormattedDistance(TransportStopController.SHOW_STOPS_RADIUS_METERS,app);
buildRow(view, 0, null, routesWithingDistance, 0, true, collapsableView,
false, 0, false, null, true);
}

View file

@ -22,7 +22,7 @@ import java.util.List;
public class TransportStopController extends MenuController {
public static final int SHOW_STOPS_RADIUS_IN_METERS = 150;
public static final int SHOW_STOPS_RADIUS_METERS = 150;
private TransportStop transportStop;
private List<TransportStopRoute> routes = new ArrayList<>();
@ -97,7 +97,7 @@ public class TransportStopController extends MenuController {
addRoutes(routes, useEnglishNames, t, transportStop, transportStop, 0);
}
ArrayList<TransportStop> ls = new ArrayList<>();
QuadRect ll = MapUtils.calculateLatLonBbox(transportStop.getLocation().getLatitude(), transportStop.getLocation().getLongitude(), SHOW_STOPS_RADIUS_IN_METERS);
QuadRect ll = MapUtils.calculateLatLonBbox(transportStop.getLocation().getLatitude(), transportStop.getLocation().getLongitude(), SHOW_STOPS_RADIUS_METERS);
t.searchTransportStops(ll.top, ll.left, ll.bottom, ll.right, -1, ls, null);
for(TransportStop tstop : ls) {
if(tstop.getId().longValue() != transportStop.getId().longValue() || empty) {