Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/adapters/PalinaAdapter.java
Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | public View getView(int position, View convertView, @NonNull ViewGroup parent) { | ||||
break; | break; | ||||
case TRAM: // never used but whatever. | case TRAM: // never used but whatever. | ||||
vh.rowStopIcon.setBackgroundResource(busBg); | vh.rowStopIcon.setBackgroundResource(busBg); | ||||
vh.rowRouteDestination.setCompoundDrawablesWithIntrinsicBounds(tramIcon, 0, 0, 0); | vh.rowRouteDestination.setCompoundDrawablesWithIntrinsicBounds(tramIcon, 0, 0, 0); | ||||
break; | break; | ||||
} | } | ||||
List<Passaggio> passaggi = route.passaggi; | List<Passaggio> passaggi = route.passaggi; | ||||
//TODO: Sort the passaggi with realtime first if source is GTTJSONFetcher | |||||
if(passaggi.size() == 0) { | if(passaggi.size() == 0) { | ||||
vh.rowRouteTimetable.setText(R.string.no_passages); | vh.rowRouteTimetable.setText(R.string.no_passages); | ||||
} else { | } else { | ||||
vh.rowRouteTimetable.setText(route.getPassaggiToString()); | vh.rowRouteTimetable.setText(route.getPassaggiToString()); | ||||
} | } | ||||
return convertView; | return convertView; | ||||
Show All 16 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register