Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

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

0 comments on commit f34916c

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