aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/POIView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/POIView.java')
-rw-r--r--src/net/cbaines/suma/POIView.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/net/cbaines/suma/POIView.java b/src/net/cbaines/suma/POIView.java
index 733cd0f..fb8a6c6 100644
--- a/src/net/cbaines/suma/POIView.java
+++ b/src/net/cbaines/suma/POIView.java
@@ -33,6 +33,7 @@ public class POIView extends LinearLayout {
private final TextView name;
private final TextView dist;
+ private final BusRoutesView routes;
private LayoutParams textLayoutParams;
@@ -52,18 +53,22 @@ public class POIView extends LinearLayout {
this.setOrientation(HORIZONTAL);
name = new TextView(context);
- name.setTextSize(22f);
+ name.setTextSize(16f);
name.setGravity(Gravity.LEFT);
dist = new TextView(context);
- dist.setTextSize(22f);
+ dist.setTextSize(16f);
dist.setGravity(Gravity.RIGHT);
+ routes = new BusRoutesView(context, (byte) 0);
+
textLayoutParams = new LayoutParams(width - (width / 4), LayoutParams.WRAP_CONTENT);
LayoutParams distLayoutParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
+ LayoutParams busRouteLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
setPOIAndDist(poi, distInM);
+ addView(routes, busRouteLayoutParams);
addView(name, textLayoutParams);
addView(dist, distLayoutParams);
}
@@ -87,6 +92,9 @@ public class POIView extends LinearLayout {
// Log.i(TAG, "Its a bus stop of description " + busStop.description);
name.setText(busStop.description + " (" + busStop.id + ")");
+
+ routes.setRoutes(busStop.routes);
+
} else if (poi.type == POI.SITE) {
Site site = (Site) poi;