Changed estimated arrival text to emphasize arrival at *destination*

This commit is contained in:
Doug Keen 2012-10-21 12:31:24 -07:00
parent 05c6c2298a
commit 5f04b943ea
2 changed files with 52 additions and 48 deletions

View File

@ -44,4 +44,5 @@
<string name="set_alarm">Set alarm</string>
<string name="leaving">Leaving</string>
<string name="departed">Departed</string>
<string name="arrives_at_destination">Arrive @ dest. ~</string>
</resources>

View File

@ -77,10 +77,12 @@ public class DepartureArrayAdapter extends ArrayAdapter<Departure> {
.findViewById(R.id.trainLengthText);
initTextSwitcher(textSwitcher);
final String arrivesAtDestinationPrefix = getContext().getString(
R.string.arrives_at_destination);
final String estimatedArrivalTimeText = departure
.getEstimatedArrivalTimeText(getContext());
if (!StringUtils.isBlank(estimatedArrivalTimeText)) {
textSwitcher.setCurrentText("Est. arrival "
textSwitcher.setCurrentText(arrivesAtDestinationPrefix
+ estimatedArrivalTimeText);
} else {
textSwitcher.setCurrentText(departure.getTrainLengthText());
@ -96,7 +98,8 @@ public class DepartureArrayAdapter extends ArrayAdapter<Departure> {
if (StringUtils.isBlank(estimatedArrivalTimeText)) {
return "";
} else {
return "Est. arrival " + estimatedArrivalTimeText;
return arrivesAtDestinationPrefix
+ estimatedArrivalTimeText;
}
}
}