diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-02-18 21:14:17 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-02-18 21:14:17 +0000 |
commit | 4ee5e20a86f34961ffaf2081f2602e1486de6f92 (patch) | |
tree | 57ef79ee93ca5d38dda2fb86aac275c1586c54a5 /src/net/cbaines/suma/StopView.java | |
parent | b374a50fb6f3bd0866bc1f75f7592abb0a6b8cc1 (diff) | |
download | southamptonuniversitymap-4ee5e20a86f34961ffaf2081f2602e1486de6f92.tar southamptonuniversitymap-4ee5e20a86f34961ffaf2081f2602e1486de6f92.tar.gz |
More bug fixes, working non uni link bus times, just need to get the non uni link bus stops working :)
Diffstat (limited to 'src/net/cbaines/suma/StopView.java')
-rw-r--r-- | src/net/cbaines/suma/StopView.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/net/cbaines/suma/StopView.java b/src/net/cbaines/suma/StopView.java index 011964d..08e5843 100644 --- a/src/net/cbaines/suma/StopView.java +++ b/src/net/cbaines/suma/StopView.java @@ -23,7 +23,6 @@ import java.sql.SQLException; import java.text.DateFormat; import android.app.Activity; -import android.content.Context; import android.content.Intent; import android.view.Gravity; import android.view.View; @@ -87,15 +86,19 @@ public class StopView extends LinearLayout implements OnClickListener, OnLongCli if (stop.bus.id != null) { if (stop.live) { - onClickMessage = "Bus " + stop.bus.toString() + " at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); + onClickMessage = "Bus " + stop.bus.toString() + " at " + + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } else { - onClickMessage = "Timetabled bus " + stop.bus.toString() + " at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); + onClickMessage = "Timetabled bus " + stop.bus.toString() + " at " + + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } } else { if (stop.live) { - onClickMessage = "Unidentified bus (" + stop.bus.getName() + ") at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); + onClickMessage = "Unidentified bus (" + stop.bus.getName() + ") at " + + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } else { - onClickMessage = "Timetabled bus (" + stop.bus.getName() + ") at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); + onClickMessage = "Timetabled bus (" + stop.bus.getName() + ") at " + + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } } } catch (SQLException e) { @@ -133,7 +136,8 @@ public class StopView extends LinearLayout implements OnClickListener, OnLongCli ((Activity) context).startActivityForResult(i, 0); } else { if (context.activityToast == null) { - context.activityToast = Toast.makeText(context, "Arival prediction not avalible for timetabled buses", Toast.LENGTH_SHORT); + context.activityToast = Toast.makeText(context, + "Arival prediction not avalible for timetabled buses", Toast.LENGTH_SHORT); } else { context.activityToast.setText("Arival prediction not avalible for timetabled buses"); context.activityToast.setDuration(Toast.LENGTH_SHORT); |