diff options
Diffstat (limited to 'src/net/cbaines/suma/BusSpecificStopView.java')
-rw-r--r-- | src/net/cbaines/suma/BusSpecificStopView.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/net/cbaines/suma/BusSpecificStopView.java b/src/net/cbaines/suma/BusSpecificStopView.java index 4cac19a..06bd267 100644 --- a/src/net/cbaines/suma/BusSpecificStopView.java +++ b/src/net/cbaines/suma/BusSpecificStopView.java @@ -108,7 +108,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener if (stop.bus.id != null) { if (stop.live) { - onClickMessage = "Bus " + stop.bus.toString() + " at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); } else { @@ -122,7 +121,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener } else { onClickMessage = "Timetabled bus (" + stop.bus.getName() + ") at " + DateFormat.getTimeInstance(DateFormat.SHORT).format(stop.arivalTime); - } } } else { @@ -130,7 +128,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener if (stop.live) { onClickMessage = "Bus " + stop.bus.toString(); } else { - onClickMessage = "Timetabled bus " + stop.bus.toString(); } } else { @@ -138,7 +135,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener onClickMessage = "Unidentified bus (" + stop.bus.getName() + ")"; } else { onClickMessage = "Timetabled bus (" + stop.bus.getName() + ")"; - } } } @@ -152,9 +148,7 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener public void onClick(View v) { if (context.activityToast == null) { - context.activityToast = Toast.makeText(context, onClickMessage, Toast.LENGTH_SHORT); - } else { context.activityToast.setText(onClickMessage); context.activityToast.setDuration(Toast.LENGTH_SHORT); @@ -163,7 +157,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener } public boolean onLongClick(View v) { // TODO - DatabaseHelper helper = OpenHelperManager.getHelper(context, DatabaseHelper.class); try { @@ -172,17 +165,16 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener busDao.refresh(stop.bus); if (stop.bus.id != null) { + // TODO Change to URI Intent i = new Intent(context, MapActivity.class); i.putExtra("poiPoint", stop.busStop.point.toDoubleString()); ((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); } else { context.activityToast.setText("Arival prediction not avalible for timetabled buses"); - context.activityToast.setDuration(Toast.LENGTH_SHORT); } context.activityToast.show(); |