kopia lustrzana https://github.com/ge0rg/aprsdroid
implement no-op map view
rodzic
1708f89292
commit
a2b73f6372
|
@ -10,6 +10,8 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
|
||||
<application android:label="@string/app_name" android:icon="@drawable/icon">
|
||||
<uses-library android:name="com.google.android.maps" />
|
||||
|
||||
<activity android:name=".APRSdroid"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
|
@ -19,6 +21,8 @@
|
|||
</activity>
|
||||
<activity android:name=".PrefsAct"
|
||||
android:label="@string/app_name" />
|
||||
<activity android:name=".MapAct"
|
||||
android:label="@string/app_name" />
|
||||
<service android:name=".AprsService">
|
||||
<intent-filter>
|
||||
<action android:name="de.duenndns.aprsdroid.SERVICE" />
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
# project structure.
|
||||
|
||||
# Project target: Android 1.6
|
||||
target=android-8
|
||||
target=Google Inc.:Google APIs:8
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.maps.MapView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mapview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:clickable="true"
|
||||
android:apiKey="not for your eyes"
|
||||
/>
|
|
@ -7,6 +7,10 @@
|
|||
android:title="@string/about"
|
||||
android:alphabeticShortcut="a"
|
||||
android:icon="@android:drawable/ic_menu_info_details" />
|
||||
<item android:id="@+id/map"
|
||||
android:title="@string/show_map"
|
||||
android:alphabeticShortcut="m"
|
||||
android:icon="@android:drawable/ic_menu_mapmode" />
|
||||
<item android:id="@+id/quit"
|
||||
android:title="@string/quit"
|
||||
android:alphabeticShortcut="q"
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
<!-- options menu -->
|
||||
<string name="about">About</string>
|
||||
<string name="show_map">Show Map</string>
|
||||
<string name="quit">Quit</string>
|
||||
<string name="preferences">Preferences</string>
|
||||
<!-- preferences -->
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
}
|
Ładowanie…
Reference in New Issue