From 5f04b943eac6a13219e9ecc9af7a1b975dc8c456 Mon Sep 17 00:00:00 2001 From: Doug Keen Date: Sun, 21 Oct 2012 12:31:24 -0700 Subject: [PATCH] Changed estimated arrival text to emphasize arrival at *destination* --- res/values/strings.xml | 93 ++++++++++--------- .../bart/data/DepartureArrayAdapter.java | 7 +- 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 72ef65b..b940986 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,47 +1,48 @@ - - - - BART Runner - Favorite routes - No favorite routes have been added yet - Loading, please wait… - Add a route - Origin - Destination - Save - The origin and destination stations must be - different - You must select a destination station - You must select an origin station - Please wait while real time departure data is - loaded - No departure data is currently available for this - route. Note that this route may require a non-standard transfer due to - a temporary change in service. Check for service advisories posted at - http://m.bart.gov/schedules/advisories/ - View - View departures - Missing/inaccurate departure? Feature request? Please report to bartrunner@dougkeen.com - Delete - Yes - Cancel - View details on BART site - Could not connect to BART services. Please try - again later. - Also add return route - View system map - System map - Departures - OK - Quick departure lookup - I will board this train - Departure options - Your train - Set up departure alarm - Your train is leaving soon! - Silence alarm - Cancel alarm - Set alarm - Leaving - Departed + + + + BART Runner + Favorite routes + No favorite routes have been added yet + Loading, please wait… + Add a route + Origin + Destination + Save + The origin and destination stations must be + different + You must select a destination station + You must select an origin station + Please wait while real time departure data is + loaded + No departure data is currently available for this + route. Note that this route may require a non-standard transfer due to + a temporary change in service. Check for service advisories posted at + http://m.bart.gov/schedules/advisories/ + View + View departures + Missing/inaccurate departure? Feature request? Please report to bartrunner@dougkeen.com + Delete + Yes + Cancel + View details on BART site + Could not connect to BART services. Please try + again later. + Also add return route + View system map + System map + Departures + OK + Quick departure lookup + I will board this train + Departure options + Your train + Set up departure alarm + Your train is leaving soon! + Silence alarm + Cancel alarm + Set alarm + Leaving + Departed + Arrive @ dest. ~ \ No newline at end of file diff --git a/src/com/dougkeen/bart/data/DepartureArrayAdapter.java b/src/com/dougkeen/bart/data/DepartureArrayAdapter.java index c4d850d..ff4a0bc 100644 --- a/src/com/dougkeen/bart/data/DepartureArrayAdapter.java +++ b/src/com/dougkeen/bart/data/DepartureArrayAdapter.java @@ -77,10 +77,12 @@ public class DepartureArrayAdapter extends ArrayAdapter { .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 { if (StringUtils.isBlank(estimatedArrivalTimeText)) { return ""; } else { - return "Est. arrival " + estimatedArrivalTimeText; + return arrivesAtDestinationPrefix + + estimatedArrivalTimeText; } } }