changed name of method

This commit is contained in:
Chumva 2018-03-05 15:17:39 +02:00
parent ed344beec7
commit fa8fa3d900

View file

@ -41,7 +41,7 @@ public class TransportStopRouteAdapter extends ArrayAdapter<TransportStopRoute>
TransportStopRoute transportStopRoute = getItem(position); TransportStopRoute transportStopRoute = getItem(position);
if (transportStopRoute != null) { if (transportStopRoute != null) {
TextView transportStopRouteTextView = (TextView) convertView.findViewById(R.id.transport_stop_route_text); TextView transportStopRouteTextView = (TextView) convertView.findViewById(R.id.transport_stop_route_text);
transportStopRouteTextView.setText(getRouteRefSubstring(transportStopRoute.route.getRef())); transportStopRouteTextView.setText(getAdjustedRouteRef(transportStopRoute.route.getRef()));
GradientDrawable gradientDrawableBg = (GradientDrawable) transportStopRouteTextView.getBackground(); GradientDrawable gradientDrawableBg = (GradientDrawable) transportStopRouteTextView.getBackground();
gradientDrawableBg.setColor(transportStopRoute.getColor(app, nightMode)); gradientDrawableBg.setColor(transportStopRoute.getColor(app, nightMode));
} }
@ -58,7 +58,7 @@ public class TransportStopRouteAdapter extends ArrayAdapter<TransportStopRoute>
return convertView; return convertView;
} }
private String getRouteRefSubstring(String ref) { private String getAdjustedRouteRef(String ref) {
if (ref.contains(":")) { if (ref.contains(":")) {
ref = ref.substring(0, ref.lastIndexOf(':')); ref = ref.substring(0, ref.lastIndexOf(':'));
} }