diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-03-15 22:26:39 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-03-15 22:26:39 +0000 |
commit | b64d1a19c68a703526460bec8e9a0ea22448b1b5 (patch) | |
tree | 418fad5645493b35bfde45b1d5d7cdf5cf435b31 /src/net/cbaines/suma/BusSpecificStopView.java | |
parent | e667851ae9869167677aa5e6e4c20707417cc687 (diff) | |
download | southamptonuniversitymap-b64d1a19c68a703526460bec8e9a0ea22448b1b5.tar southamptonuniversitymap-b64d1a19c68a703526460bec8e9a0ea22448b1b5.tar.gz |
More Bus Activity work.
Diffstat (limited to 'src/net/cbaines/suma/BusSpecificStopView.java')
-rw-r--r-- | src/net/cbaines/suma/BusSpecificStopView.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/net/cbaines/suma/BusSpecificStopView.java b/src/net/cbaines/suma/BusSpecificStopView.java index b140420..7252802 100644 --- a/src/net/cbaines/suma/BusSpecificStopView.java +++ b/src/net/cbaines/suma/BusSpecificStopView.java @@ -90,22 +90,20 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener this.stop = stop; - // if (stop.busStop.description.length() > 20) { - // location.setText(stop.busStop.description.substring(0, 20)); // TODO - // } else { - location.setText(stop.busStop.description); // TODO - // } + location.setText(stop.busStop.description); + + if (stop instanceof StopLoading) { + timeProgress.setVisibility(View.VISIBLE); + } else { + timeProgress.setVisibility(View.GONE); + } if (stop.arivalTime != null) { // Time available time.setText(stop.getShortTimeToArival()); time.setVisibility(View.VISIBLE); - timeProgress.setVisibility(View.GONE); - } else if (stop instanceof StopLoading) { - timeProgress.setVisibility(View.VISIBLE); } else { // No time available (yet) and not currently loading time.setVisibility(View.GONE); time.setText(""); - timeProgress.setVisibility(View.GONE); } DatabaseHelper helper = OpenHelperManager.getHelper(context, DatabaseHelper.class); @@ -117,10 +115,10 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener if (stop.arivalTime != null) { if (stop.live) { - onClickMessage = stop.bus.getName() + " at " + onClickMessage = stop.bus.getName() + " at " + stop.busStop.description + " at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } else { - onClickMessage = stop.bus.getName() + " at " + onClickMessage = stop.bus.getName() + " at " + stop.busStop.description + " at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime) + " (timetabled)"; } } else { |