aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/raw/ormlite_config.txt2
-rw-r--r--src/net/cbaines/suma/DataHandler.java12
-rw-r--r--src/net/cbaines/suma/MapActivity.java7
-rw-r--r--src/net/cbaines/suma/POIView.java2
-rw-r--r--src/net/cbaines/suma/StopView.java6
5 files changed, 19 insertions, 10 deletions
diff --git a/res/raw/ormlite_config.txt b/res/raw/ormlite_config.txt
index 60f9ade..2268ae9 100644
--- a/res/raw/ormlite_config.txt
+++ b/res/raw/ormlite_config.txt
@@ -1,3 +1,3 @@
#
-# generated on 2012/02/01 07:59:58
+# generated on 2012/02/19 09:50:39
#
diff --git a/src/net/cbaines/suma/DataHandler.java b/src/net/cbaines/suma/DataHandler.java
index f564d19..25f66ff 100644
--- a/src/net/cbaines/suma/DataHandler.java
+++ b/src/net/cbaines/suma/DataHandler.java
@@ -25,8 +25,6 @@ import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
-import android.util.Log;
-
public class DataHandler extends DefaultHandler {
// this holds the data
@@ -70,7 +68,8 @@ public class DataHandler extends DefaultHandler {
}
/**
- * This gets called at the start of an element. Here we're also setting the booleans to true if it's at that specific tag. (so we know where we are)
+ * This gets called at the start of an element. Here we're also setting the booleans to true if it's at that
+ * specific tag. (so we know where we are)
*
* @param namespaceURI
* @param localName
@@ -81,7 +80,8 @@ public class DataHandler extends DefaultHandler {
@Override
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
if (localName.equals("trkpt")) {
- // Log.v("DataHandler", "Adding point to route overlay " + atts.getValue("lat") + " " + atts.getValue("lon"));
+ // Log.v("DataHandler", "Adding point to route overlay " + atts.getValue("lat") + " " +
+ // atts.getValue("lon"));
_data.addPoint(Util.csLatLongToGeoPoint(atts.getValue("lat"), atts.getValue("lon")));
}
}
@@ -100,8 +100,8 @@ public class DataHandler extends DefaultHandler {
}
/**
- * Calling when we're within an element. Here we're checking to see if there is any content in the tags that we're interested in and populating it in the
- * Config object.
+ * Calling when we're within an element. Here we're checking to see if there is any content in the tags that we're
+ * interested in and populating it in the Config object.
*
* @param ch
* @param start
diff --git a/src/net/cbaines/suma/MapActivity.java b/src/net/cbaines/suma/MapActivity.java
index d12057c..cad7567 100644
--- a/src/net/cbaines/suma/MapActivity.java
+++ b/src/net/cbaines/suma/MapActivity.java
@@ -758,6 +758,13 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
&& !activityPrefs.getBoolean(BUS_STOP_OVERLAYS + "U9",
UNI_LINK_BUS_STOP_OVERLAY_ENABLED_BY_DEFAULT)) {
Log.i(TAG, "Uni-Link bus stop overlay not needed");
+ overlays.remove(UNI_LINK_BUS_STOP_OVERLAY);
+
+ synchronized (mapView.getOverlays()) {
+ mapView.getOverlays().remove(uniLinkBusStopOverlay);
+ Collections.sort(mapView.getOverlays(), comparator);
+ }
+
uniLinkBusStopOverlay = null;
} else {
uniLinkBusStopOverlay.setRoutes(0, activityPrefs.getBoolean(BUS_STOP_OVERLAYS + "U1",
diff --git a/src/net/cbaines/suma/POIView.java b/src/net/cbaines/suma/POIView.java
index d312f37..fb8a6c6 100644
--- a/src/net/cbaines/suma/POIView.java
+++ b/src/net/cbaines/suma/POIView.java
@@ -23,11 +23,9 @@ import android.content.Context;
import android.util.Log;
import android.view.Display;
import android.view.Gravity;
-import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.TableLayout.LayoutParams;
public class POIView extends LinearLayout {
diff --git a/src/net/cbaines/suma/StopView.java b/src/net/cbaines/suma/StopView.java
index 32cd3e1..764072e 100644
--- a/src/net/cbaines/suma/StopView.java
+++ b/src/net/cbaines/suma/StopView.java
@@ -24,6 +24,7 @@ import java.text.DateFormat;
import android.app.Activity;
import android.content.Intent;
+import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
@@ -131,13 +132,16 @@ public class StopView extends LinearLayout implements OnClickListener, OnLongCli
busDao.refresh(stop.bus);
busRouteDao.refresh(stop.bus.route);
+ Log.i("StopView", "Bus route " + stop.bus.route + " Uni-Link " + stop.bus.route.uniLink + " Bus ID "
+ + stop.bus.id);
+
if (stop.bus.id != null && stop.bus.route.uniLink) {
Intent i = new Intent(context, BusActivity.class);
i.putExtra("busID", stop.bus.id);
i.putExtra("busStopID", stop.busStop.id);
((Activity) context).startActivityForResult(i, 0);
} else {
- if (stop.bus.route.uniLink) {
+ if (!stop.bus.route.uniLink) {
if (context.activityToast == null) {
context.activityToast = Toast.makeText(context,
"Bus schedules only avalible for Uni-Link buses", Toast.LENGTH_SHORT);