aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-02-01 20:12:27 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-02-01 20:12:27 +0000
commitce7543bef301f2a622023b2633166409de93d09e (patch)
treee5c56d22ed1eeba757c1022942416ff43ec792c2
parent17ab48f10cc7cc56c7234695b2372445cb6adf6d (diff)
downloadsouthamptonuniversitymap-ce7543bef301f2a622023b2633166409de93d09e.tar
southamptonuniversitymap-ce7543bef301f2a622023b2633166409de93d09e.tar.gz
Fixes in AboutActivity, and some string stuff.
-rw-r--r--AndroidManifest.xml2
-rw-r--r--gen/net/cbaines/suma/R.java15
-rw-r--r--res/raw/ormlite_config.txt2
-rw-r--r--res/values/strings.xml2
-rw-r--r--src/net/cbaines/suma/AboutActivity.java62
-rw-r--r--src/net/cbaines/suma/DataHandler.java2
6 files changed, 47 insertions, 38 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 69eb2fd..4fd68e4 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -31,6 +31,8 @@
</activity>
<activity android:name="AboutActivity" >
</activity>
+ <activity android:name="BuildingActivity" >
+ </activity>
<activity
android:name=".PreferencesActivity"
android:label="@string/preferences" >
diff --git a/gen/net/cbaines/suma/R.java b/gen/net/cbaines/suma/R.java
index 8b15d5f..9f05f48 100644
--- a/gen/net/cbaines/suma/R.java
+++ b/gen/net/cbaines/suma/R.java
@@ -113,13 +113,14 @@ public final class R {
public static final int stop_menu=0x7f090001;
}
public static final class raw {
- public static final int ormlite_config=0x7f060000;
- public static final int u1=0x7f060001;
- public static final int u1e=0x7f060002;
- public static final int u1n=0x7f060003;
- public static final int u2=0x7f060004;
- public static final int u6=0x7f060005;
- public static final int u9=0x7f060006;
+ public static final int org=0x7f060000;
+ public static final int ormlite_config=0x7f060001;
+ public static final int u1=0x7f060002;
+ public static final int u1e=0x7f060003;
+ public static final int u1n=0x7f060004;
+ public static final int u2=0x7f060005;
+ public static final int u6=0x7f060006;
+ public static final int u9=0x7f060007;
}
public static final class string {
public static final int U1=0x7f070009;
diff --git a/res/raw/ormlite_config.txt b/res/raw/ormlite_config.txt
index 4cd38cd..60f9ade 100644
--- a/res/raw/ormlite_config.txt
+++ b/res/raw/ormlite_config.txt
@@ -1,3 +1,3 @@
#
-# generated on 2012/01/31 05:34:59
+# generated on 2012/02/01 07:59:58
#
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 948c10e..a53109b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -104,7 +104,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<
<string name="about_data">Live Bus Data</string>
<string name="about_data_summary">Provided under the Open Government License by the Southampton City Council ROMANSE office through the University of Southampton Open Data Service.</string>
<string name="about_android_market">Android Market App Page</string>
- <string name="about_android_market_summary">insert link</string>
+ <string name="about_android_market_summary">market://details?id=net.cbaines.suma</string>
<string name="about_map_data">Map Data</string>
<string name="about_map_data_summary">From the OpenStreetMap project, exported and used from the University of Southampton Open Data Service.</string>
<string name="about_map_icons">Map Icons</string>
diff --git a/src/net/cbaines/suma/AboutActivity.java b/src/net/cbaines/suma/AboutActivity.java
index 70e9ebf..a455d70 100644
--- a/src/net/cbaines/suma/AboutActivity.java
+++ b/src/net/cbaines/suma/AboutActivity.java
@@ -26,6 +26,7 @@ import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
+import android.util.Log;
public class AboutActivity extends PreferenceActivity {
@@ -43,6 +44,8 @@ public class AboutActivity extends PreferenceActivity {
private static final String KEY_ABOUT_DATABASE = "about_database";
private static final String KEY_ABOUT_DONATE = "about_donate";
+ private static final String TAG = "AboutActivity";
+
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -51,35 +54,38 @@ public class AboutActivity extends PreferenceActivity {
@Override
public boolean onPreferenceTreeClick(final PreferenceScreen preferenceScreen, final Preference preference) {
- final String key = preference.getKey();
- if (KEY_ABOUT_LICENSE.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.gnu.org/licenses/gpl-2.0.html")));
- } else if (KEY_ABOUT_PROJECT.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/cbaines/SouthamptonUniversityMap")));
- } else if (KEY_ABOUT_DEVELOPER.equals(key)) {
- Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
- emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { "cbaines8@gmail.com" });
- emailIntent.setType("text/plain");
-
- startActivity(Intent.createChooser(emailIntent, "Email the developer"));
- } else if (KEY_ABOUT_DATA.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://data.southampton.ac.uk/bus-routes.html")));
- } else if (KEY_ABOUT_ANDROID_MARKET.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://market.android.com/details?id=net.cbaines.suma")));
- } else if (KEY_ABOUT_MAP_DATA.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("http://data.southampton.ac.uk/places.html"))));
- } else if (KEY_ABOUT_MAP_ICONS.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://mapicons.nicolasmollet.com/")));
- } else if (KEY_ABOUT_OSM_MAP.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.openstreetmap.org/")));
- } else if (KEY_ABOUT_MAP_TILES.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.mapquest.com/")));
- } else if (KEY_ABOUT_DATABASE.equals(key)) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("http://ormlite.com/"))));
- } else if (KEY_ABOUT_DONATE.equals(key)) {
- showDialog(DONATE_DIALOG_ID);
- }
+ try {
+ final String key = preference.getKey();
+ if (KEY_ABOUT_LICENSE.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.gnu.org/licenses/gpl-2.0.html")));
+ } else if (KEY_ABOUT_PROJECT.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/cbaines/SouthamptonUniversityMap")));
+ } else if (KEY_ABOUT_DEVELOPER.equals(key)) {
+ Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
+ emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { "cbaines8@gmail.com" });
+ emailIntent.setType("text/plain");
+ startActivity(Intent.createChooser(emailIntent, "Email the developer"));
+ } else if (KEY_ABOUT_DATA.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://data.southampton.ac.uk/bus-routes.html")));
+ } else if (KEY_ABOUT_ANDROID_MARKET.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=net.cbaines.suma")));
+ } else if (KEY_ABOUT_MAP_DATA.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("http://data.southampton.ac.uk/places.html"))));
+ } else if (KEY_ABOUT_MAP_ICONS.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://mapicons.nicolasmollet.com/")));
+ } else if (KEY_ABOUT_OSM_MAP.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.openstreetmap.org/")));
+ } else if (KEY_ABOUT_MAP_TILES.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.mapquest.com/")));
+ } else if (KEY_ABOUT_DATABASE.equals(key)) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("http://ormlite.com/"))));
+ } else if (KEY_ABOUT_DONATE.equals(key)) {
+ showDialog(DONATE_DIALOG_ID);
+ }
+ } catch (Exception e) {
+ Log.e("Error opening one of the icons", TAG, e);
+ }
return false;
}
diff --git a/src/net/cbaines/suma/DataHandler.java b/src/net/cbaines/suma/DataHandler.java
index f6263da..f564d19 100644
--- a/src/net/cbaines/suma/DataHandler.java
+++ b/src/net/cbaines/suma/DataHandler.java
@@ -81,7 +81,7 @@ 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")));
}
}