From e667851ae9869167677aa5e6e4c20707417cc687 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 15 Mar 2012 13:42:44 +0000 Subject: Progress with the Bus activiy. --- src/net/cbaines/suma/BusActivity.java | 8 ++--- src/net/cbaines/suma/BusRoute.java | 43 ++++++++++++++-------- src/net/cbaines/suma/BusSpecificStopView.java | 4 +-- src/net/cbaines/suma/DataManager.java | 52 +++++++++++++++++++++++++-- 4 files changed, 84 insertions(+), 23 deletions(-) (limited to 'src/net/cbaines/suma') diff --git a/src/net/cbaines/suma/BusActivity.java b/src/net/cbaines/suma/BusActivity.java index 8d7dcbe..c043687 100644 --- a/src/net/cbaines/suma/BusActivity.java +++ b/src/net/cbaines/suma/BusActivity.java @@ -115,7 +115,8 @@ public class BusActivity extends ToastHelperActivity implements Preferences { if (bus.id != null) { // Log.i(TAG, "Bus id is not null (" + bus.id + // ") setting busIDTextView"); - busIDTextView.setText(bus.id + " " + bus.getName()); + getHelper().getBusRouteDao().refresh(bus.route); + busIDTextView.setText(bus.id + " " + bus.route.label); } else { Log.w(TAG, "Bus id is null?"); // Might not ever happen @@ -279,9 +280,8 @@ public class BusActivity extends ToastHelperActivity implements Preferences { // Remove the old time from the timetable synchronized (timetable) { - timetable.set(num, - new StopLoading(bus, busStops.get(num), null, new Date( - System.currentTimeMillis() - 21000), false)); + timetable.set(num, new StopLoading(bus, busStops.get(num), timetable.get(num).arivalTime, + new Date(System.currentTimeMillis() - 21000), false)); displayTimetable(timetable); } diff --git a/src/net/cbaines/suma/BusRoute.java b/src/net/cbaines/suma/BusRoute.java index e38d06a..54f1340 100644 --- a/src/net/cbaines/suma/BusRoute.java +++ b/src/net/cbaines/suma/BusRoute.java @@ -65,7 +65,8 @@ public class BusRoute { String label; /** - * The direction the bus is travelling if it is moving through the route and sequence is increasing. + * The direction the bus is travelling if it is moving through the route and + * sequence is increasing. *