aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-02-08 17:47:58 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-02-08 17:47:58 +0000
commit347f8a6187e7bc84bbc988bb171840224daae967 (patch)
tree5bf68b4a3f5e6e4ea99776bf86a3053ea41578b9 /src
parentbb6e47db6fc1152bacf15095e1ea0ef907848b07 (diff)
downloadsouthamptonuniversitymap-347f8a6187e7bc84bbc988bb171840224daae967.tar
southamptonuniversitymap-347f8a6187e7bc84bbc988bb171840224daae967.tar.gz
Messed up commit, tested the bus stop movement, it works :). Begin intergrating more data....
Diffstat (limited to 'src')
-rw-r--r--src/net/cbaines/suma/BusRoute.java2
-rw-r--r--src/net/cbaines/suma/BusStopActivity.java5
-rw-r--r--src/net/cbaines/suma/POIDialog.java2
-rw-r--r--src/net/cbaines/suma/SouthamptonUniversityMapActivity.java12
4 files changed, 7 insertions, 14 deletions
diff --git a/src/net/cbaines/suma/BusRoute.java b/src/net/cbaines/suma/BusRoute.java
index 96cf0ce..b25b5d0 100644
--- a/src/net/cbaines/suma/BusRoute.java
+++ b/src/net/cbaines/suma/BusRoute.java
@@ -156,7 +156,7 @@ public class BusRoute {
if (moveAmount > 0) {
Log.v("BusStop", "stopIndex " + stopIndex);
- int stopWanted = (stopIndex + moveAmount) % (routeStopsFound.size() + 1);
+ int stopWanted = (stopIndex + moveAmount) % (routeStopsFound.size());
Log.v("BusStop", "stopWanted " + stopWanted);
busStopDao.refresh(routeStopsFound.get(stopWanted).stop);
diff --git a/src/net/cbaines/suma/BusStopActivity.java b/src/net/cbaines/suma/BusStopActivity.java
index b2eff62..f3f5cce 100644
--- a/src/net/cbaines/suma/BusStopActivity.java
+++ b/src/net/cbaines/suma/BusStopActivity.java
@@ -206,7 +206,8 @@ public class BusStopActivity extends OrmLiteBaseActivity<DatabaseHelper> impleme
super.onResume();
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- if (sharedPrefs.getBoolean(UNI_LINK_BUS_TIMES, false) || sharedPrefs.getBoolean(NON_UNI_LINK_BUS_TIMES, false)) {
+ if (sharedPrefs.getBoolean(UNI_LINK_BUS_TIMES, UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT)
+ || sharedPrefs.getBoolean(NON_UNI_LINK_BUS_TIMES, NON_UNI_LINK_BUS_TIMES_ENABLED_BY_DEFAULT)) {
Log.i(TAG, "Live Times enabled");
timetable = (Timetable) getLastNonConfigurationInstance();
@@ -303,7 +304,7 @@ public class BusStopActivity extends OrmLiteBaseActivity<DatabaseHelper> impleme
errorMessage = "Error message regarding SQL?";
e.printStackTrace();
} catch (ClientProtocolException e) {
- errorMessage = "Insert error message here!";
+ errorMessage = "ClientProtocolException!?!";
e.printStackTrace();
} catch (IOException e) {
errorMessage = "Error fetching bus times from server, are you connected to the internet?";
diff --git a/src/net/cbaines/suma/POIDialog.java b/src/net/cbaines/suma/POIDialog.java
index 67be966..20304bb 100644
--- a/src/net/cbaines/suma/POIDialog.java
+++ b/src/net/cbaines/suma/POIDialog.java
@@ -31,7 +31,7 @@ import android.widget.TextView;
public class POIDialog extends Dialog {
- private static final String TAG = "POIDialog";
+ // private static final String TAG = "POIDialog";
private ListView listItems;
private final Context context;
diff --git a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
index a7dd875..c67ceea 100644
--- a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
+++ b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
@@ -76,7 +76,7 @@ import com.j256.ormlite.dao.Dao;
public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements MapViewConstants, Runnable, RouteColorConstants,
OnChildClickListener, OnItemClickListener, OnItemLongClickListener, OnSharedPreferenceChangeListener, Preferences {
- private boolean useBundledDatabase = false;
+ private boolean useBundledDatabase = true;
private MapView mapView;
private MapController mapController;
@@ -93,32 +93,26 @@ public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<Databa
// Overlays
// Scale Bar Overlay
- private static final String SCALE_BAR_OVERLAY = "scaleBarOverlay";
private ScaleBarOverlay scaleBarOverlay;
private static final boolean SCALE_BAR_OVERLAY_ENABLED_BY_DEFAULT = true;
// My Location Overlay
- private static final String MY_LOCATION_OVERLAY = "myLocationOverlay";
private MyLocationOverlay myLocationOverlay;
private static final boolean MY_LOCATION_OVERLAY_ENABLED_BY_DEFAULT = true;
// Residential Building Overlay
- private static final String RESIDENTIAL_BUILDINGS = "residentialBuildingOverlay";
private BuildingNumOverlay residentialBuildingOverlay;
private static final boolean RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT = true;
// Non-Residential Building Overlay
- private static final String NON_RESIDENTIAL_BUILDINGS = "nonResidentialBuildingOverlay";
private BuildingNumOverlay nonResidentialBuildingOverlay;
private static final boolean NON_RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT = true;
// Uni-Link Bus Stop Overlay
- private static final String UNI_LINK_BUS_STOPS = "uniLinkBusStopOverlay";
private BusStopOverlay uniLinkBusStopOverlay;
private static final boolean UNI_LINK_BUS_STOP_OVERLAY_ENABLED_BY_DEFAULT = true;
// Uni-Link Bus Stop Overlay
- private static final String NON_UNI_LINK_BUS_STOPS = "nonUniLinkBusStopOverlay";
private BusStopOverlay nonUniLinkBusStopOverlay;
private static final boolean NON_UNI_LINK_BUS_STOP_OVERLAY_ENABLED_BY_DEFAULT = true;
@@ -134,8 +128,6 @@ public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<Databa
private static final boolean SITE_OVERLAY_ENABLED_BY_DEFAULT = false;
private static final boolean ROUTE_OVERLAY_ENABLED_BY_DEFAULT = true;
- private static final int UNI_LINK_BUS_STOP_OVERLAY_RANK = 4;
-
private POIDialog favDialog;
private SouthamptonUniversityMapActivity instance;
@@ -1230,7 +1222,7 @@ public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<Databa
// |_ Glen Eyre Hall
// |_ South Hill Hall
// |_ Chamberlain Hall
- // |_ Hartley Grove
+ // |_ Hartley Grove1 (3.2%)
// |_ Bencraft Hall
// |_ Connaught Hall
// |_ Montefiore Hall