diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ccc623e..743948e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -10,6 +10,8 @@ + + @@ -19,6 +21,8 @@ + diff --git a/default.properties b/default.properties index 4c13368..826e1fc 100644 --- a/default.properties +++ b/default.properties @@ -8,4 +8,4 @@ # project structure. # Project target: Android 1.6 -target=android-8 +target=Google Inc.:Google APIs:8 diff --git a/res/layout/mapview.xml b/res/layout/mapview.xml new file mode 100644 index 0000000..7361acd --- /dev/null +++ b/res/layout/mapview.xml @@ -0,0 +1,9 @@ + + diff --git a/res/menu/options.xml b/res/menu/options.xml index b8cc3b5..50f60b5 100644 --- a/res/menu/options.xml +++ b/res/menu/options.xml @@ -7,6 +7,10 @@ android:title="@string/about" android:alphabeticShortcut="a" android:icon="@android:drawable/ic_menu_info_details" /> + About +Show Map Quit Preferences diff --git a/src/APRSdroid.scala b/src/APRSdroid.scala index c24dc8a..8121071 100644 --- a/src/APRSdroid.scala +++ b/src/APRSdroid.scala @@ -170,6 +170,9 @@ class APRSdroid extends Activity with OnClickListener case R.id.about => aboutDialog() true + case R.id.map => + startActivity(new Intent(this, classOf[MapAct])); + true case R.id.quit => stopService(serviceIntent(AprsService.SERVICE)) finish(); diff --git a/src/MapAct.scala b/src/MapAct.scala new file mode 100644 index 0000000..0a5bf77 --- /dev/null +++ b/src/MapAct.scala @@ -0,0 +1,18 @@ +package de.duenndns.aprsdroid + +import _root_.android.os.Bundle +import _root_.com.google.android.maps.{MapActivity, MapView} + +class MapAct extends MapActivity { + val TAG = "MapAct" + + lazy val mapview = findViewById(R.id.mapview).asInstanceOf[MapView] + + override def onCreate(savedInstanceState: Bundle) { + super.onCreate(savedInstanceState) + setContentView(R.layout.mapview) + mapview.setBuiltInZoomControls(true) + } + + override def isRouteDisplayed() = false +}