Added system map menu option
This commit is contained in:
parent
c6da0f6104
commit
fd4a7b2cef
@ -6,3 +6,9 @@ syntax: regexp
|
|||||||
^colorscheme\.jpg$
|
^colorscheme\.jpg$
|
||||||
^release-builds\/.*$
|
^release-builds\/.*$
|
||||||
^gen\/.*$
|
^gen\/.*$
|
||||||
|
syntax: regexp
|
||||||
|
^Screenshot\.add\.png$
|
||||||
|
syntax: regexp
|
||||||
|
^Screenshot\.departures\.png$
|
||||||
|
syntax: regexp
|
||||||
|
^Screenshot\.list\.png$
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.dougkeen.bart" android:versionCode="5"
|
package="com.dougkeen.bart" android:versionCode="6"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0.1">
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:title="@string/view_on_bart_site" android:icon="@android:drawable/ic_menu_view"
|
<item android:title="@string/view_on_bart_site" android:icon="@android:drawable/ic_menu_view"
|
||||||
android:id="@+id/view_on_bart_site_button"></item>
|
android:id="@+id/view_on_bart_site_button"></item>
|
||||||
|
<item android:title="@string/view_system_map" android:icon="@android:drawable/ic_menu_mapmode"
|
||||||
|
android:id="@+id/view_system_map_button"></item>
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:title="@string/add_route" android:icon="@android:drawable/ic_menu_add"
|
<item android:title="@string/add_route" android:icon="@android:drawable/ic_menu_add"
|
||||||
android:id="@+id/add_favorite_menu_button"></item>
|
android:id="@+id/add_favorite_menu_button"></item>
|
||||||
|
<item android:title="@string/view_system_map" android:icon="@android:drawable/ic_menu_mapmode"
|
||||||
|
android:id="@+id/view_system_map_button"></item>
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -27,4 +27,5 @@
|
|||||||
<string name="could_not_connect">Could not connect to BART services. Please try
|
<string name="could_not_connect">Could not connect to BART services. Please try
|
||||||
again later.</string>
|
again later.</string>
|
||||||
<string name="also_add_return_route">Also add return route</string>
|
<string name="also_add_return_route">Also add return route</string>
|
||||||
|
<string name="view_system_map">View system map</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -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 String FAVORITE_CONTENT_ITEM_TYPE = "vnd.android.cursor.item/com.dougkeen.bart.favorite";
|
||||||
public static final Uri FAVORITE_CONTENT_URI = Uri.parse("content://"
|
public static final Uri FAVORITE_CONTENT_URI = Uri.parse("content://"
|
||||||
+ AUTHORITY + "/favorites");
|
+ AUTHORITY + "/favorites");
|
||||||
|
public static final String MAP_URL = "http://m.bart.gov/images/global/system-map29.gif";
|
||||||
|
|
||||||
public static final String TAG = "BartCatcher";
|
public static final String TAG = "BartCatcher";
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,11 @@ public class RoutesListActivity extends ListActivity {
|
|||||||
startActivity(new Intent(Intent.ACTION_INSERT,
|
startActivity(new Intent(Intent.ACTION_INSERT,
|
||||||
Constants.FAVORITE_CONTENT_URI));
|
Constants.FAVORITE_CONTENT_URI));
|
||||||
return true;
|
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 {
|
} else {
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
@ -319,6 +319,11 @@ public class ViewDeparturesActivity extends ListActivity {
|
|||||||
+ "&dest="
|
+ "&dest="
|
||||||
+ mDestination.abbreviation)));
|
+ mDestination.abbreviation)));
|
||||||
return true;
|
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 {
|
} else {
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user