Skip to content
Browse files

Mapsを表示するようにした (refs: 037)

  • Loading branch information...
1 parent 4d8b3da commit f34916c6f21774c2f414571b410cd577b2159a23 @mzp committed Oct 18, 2010
View
1 project/build/Andominion.scala
@@ -13,6 +13,7 @@ class Andominion(info: ProjectInfo) extends ParentProject(info) {
class MainProject(info: ProjectInfo) extends AndroidProject(info) with Defaults with MarketPublish {
val keyalias = "change-me"
val scalatest = "org.scalatest" % "scalatest" % "1.0" % "test"
+ override def addonsPath = androidSdkPath / "add-ons" / "addon_google_apis_google_inc_8" / "libs"
}
class TestProject(info: ProjectInfo) extends AndroidTestProject(info) with Defaults
View
14 src/main/AndroidManifest.xml
@@ -1,12 +1,14 @@
<manifest
android:versionName="0.1" android:versionCode="1" package="org.howdyworld.andominion" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"></uses-sdk>
+ <uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name">
- <activity android:label="@string/app_name" android:name=".Andominion">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"></action>
- <category android:name="android.intent.category.LAUNCHER"></category>
- </intent-filter>
- </activity>
+ <activity android:label="@string/app_name" android:name=".Andominion">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"></action>
+ <category android:name="android.intent.category.LAUNCHER"></category>
+ </intent-filter>
+ </activity>
+ <uses-library android:name="com.google.android.maps"></uses-library>
</application>
</manifest>
View
11 src/main/res/layout/simple_map.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <com.google.android.maps.MapView
+ android:id="@+id/map"
+ android:apiKey="07GnFCmfHXK1O6FiAUrRb3pPQLCvegvJJb8cBjg"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+</LinearLayout>
View
11 src/main/scala/Activity.scala
@@ -1,14 +1,15 @@
package org.howdyworld.andominion
+import com.google.android.maps._
import _root_.android.app.Activity
import _root_.android.os.Bundle
import _root_.android.widget.TextView
-class Andominion extends Activity {
+class Andominion extends MapActivity {
override def onCreate(savedInstanceState: Bundle) {
super.onCreate(savedInstanceState)
- setContentView(new TextView(this) {
- setText("hello, world")
- })
+ setContentView(R.layout.simple_map);
}
-}
+
+ override protected def isRouteDisplayed() = false
+}

0 comments on commit f34916c

Please sign in to comment.
Something went wrong with that request. Please try again.