From fd4a7b2cefbd5b643acd97baaccb3f68e62552e3 Mon Sep 17 00:00:00 2001 From: dougkeen Date: Sat, 16 Jul 2011 11:01:02 -0700 Subject: [PATCH] Added system map menu option --- .hgignore | 8 +++++++- AndroidManifest.xml | 4 ++-- res/menu/route_menu.xml | 2 ++ res/menu/routes_list_menu.xml | 4 +++- res/values/strings.xml | 1 + src/com/dougkeen/bart/Constants.java | 1 + src/com/dougkeen/bart/RoutesListActivity.java | 5 +++++ src/com/dougkeen/bart/ViewDeparturesActivity.java | 5 +++++ 8 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.hgignore b/.hgignore index 19462cf..6328f25 100644 --- a/.hgignore +++ b/.hgignore @@ -5,4 +5,10 @@ syntax: regexp ^bart-train\.jpg$ ^colorscheme\.jpg$ ^release-builds\/.*$ -^gen\/.*$ \ No newline at end of file +^gen\/.*$ +syntax: regexp +^Screenshot\.add\.png$ +syntax: regexp +^Screenshot\.departures\.png$ +syntax: regexp +^Screenshot\.list\.png$ \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml index bda7d35..52ad070 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.dougkeen.bart" android:versionCode="6" + android:versionName="1.0.1"> diff --git a/res/menu/route_menu.xml b/res/menu/route_menu.xml index 9e77838..d40585e 100644 --- a/res/menu/route_menu.xml +++ b/res/menu/route_menu.xml @@ -2,4 +2,6 @@ + diff --git a/res/menu/routes_list_menu.xml b/res/menu/routes_list_menu.xml index c9d1c67..5b5be09 100644 --- a/res/menu/routes_list_menu.xml +++ b/res/menu/routes_list_menu.xml @@ -1,5 +1,7 @@ + android:id="@+id/add_favorite_menu_button"> + diff --git a/res/values/strings.xml b/res/values/strings.xml index 246eb88..ac2e637 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -27,4 +27,5 @@ Could not connect to BART services. Please try again later. Also add return route + View system map diff --git a/src/com/dougkeen/bart/Constants.java b/src/com/dougkeen/bart/Constants.java index 28a9b60..ff05e84 100644 --- a/src/com/dougkeen/bart/Constants.java +++ b/src/com/dougkeen/bart/Constants.java @@ -8,6 +8,7 @@ public class Constants { public static final String FAVORITE_CONTENT_ITEM_TYPE = "vnd.android.cursor.item/com.dougkeen.bart.favorite"; public static final Uri FAVORITE_CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/favorites"); + public static final String MAP_URL = "http://m.bart.gov/images/global/system-map29.gif"; public static final String TAG = "BartCatcher"; } diff --git a/src/com/dougkeen/bart/RoutesListActivity.java b/src/com/dougkeen/bart/RoutesListActivity.java index f8fa9b8..b580439 100644 --- a/src/com/dougkeen/bart/RoutesListActivity.java +++ b/src/com/dougkeen/bart/RoutesListActivity.java @@ -92,6 +92,11 @@ public class RoutesListActivity extends ListActivity { startActivity(new Intent(Intent.ACTION_INSERT, Constants.FAVORITE_CONTENT_URI)); return true; + } else if (itemId == R.id.view_system_map_button) { + startActivity(new Intent( + Intent.ACTION_VIEW, + Uri.parse(Constants.MAP_URL))); + return true; } else { return super.onOptionsItemSelected(item); } diff --git a/src/com/dougkeen/bart/ViewDeparturesActivity.java b/src/com/dougkeen/bart/ViewDeparturesActivity.java index 2586fad..f03c7e1 100644 --- a/src/com/dougkeen/bart/ViewDeparturesActivity.java +++ b/src/com/dougkeen/bart/ViewDeparturesActivity.java @@ -319,6 +319,11 @@ public class ViewDeparturesActivity extends ListActivity { + "&dest=" + mDestination.abbreviation))); return true; + } else if (itemId == R.id.view_system_map_button) { + startActivity(new Intent( + Intent.ACTION_VIEW, + Uri.parse(Constants.MAP_URL))); + return true; } else { return super.onOptionsItemSelected(item); }