Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move library to a "library" subproject, add a "demo" subproject
- Loading branch information
Showing
27 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,45 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="com.google.maps.android.utils" | |||
android:versionCode="1" | |||
android:versionName="1.0"> | |||
|
|||
<uses-sdk | |||
android:minSdkVersion="8" | |||
android:targetSdkVersion="17"/> | |||
|
|||
<permission | |||
android:name="com.google.maps.android.utils.permission.MAPS_RECEIVE" | |||
android:protectionLevel="signature"/> | |||
<uses-permission android:name="com.google.maps.android.utils.permission.MAPS_RECEIVE"/> | |||
|
|||
<uses-permission android:name="android.permission.INTERNET"/> | |||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | |||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> | |||
|
|||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> | |||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> | |||
|
|||
<uses-feature | |||
android:glEsVersion="0x00020000" | |||
android:required="true"/> | |||
|
|||
<application | |||
android:label="@string/app_name"> | |||
|
|||
<meta-data | |||
android:name="com.google.android.maps.v2.API_KEY" | |||
android:value="AIzaSyDCa5WRSMk3CrNSf3y5xbyQTvp1_zwuTtE"/> | |||
|
|||
<activity | |||
android:name="MainActivity" | |||
android:label="@string/app_name"> | |||
<intent-filter> | |||
<action android:name="android.intent.action.MAIN"/> | |||
<category android:name="android.intent.category.LAUNCHER"/> | |||
</intent-filter> | |||
</activity> | |||
</application> | |||
|
|||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
buildscript { | |||
repositories { | |||
mavenCentral() | |||
} | |||
|
|||
dependencies { | |||
classpath 'com.android.tools.build:gradle:0.4.2' | |||
} | |||
} | |||
|
|||
apply plugin: 'android' | |||
|
|||
dependencies { | |||
compile project(':library') | |||
compile 'com.google.android.gms:play-services:3.1.36' | |||
} | |||
|
|||
android { | |||
compileSdkVersion 17 | |||
buildToolsVersion "17.0" | |||
|
|||
sourceSets { | |||
main { | |||
manifest.srcFile 'AndroidManifest.xml' | |||
java.srcDirs = ['src'] | |||
res.srcDirs = ['res'] | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,69 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module external.linked.project.path="$MODULE_DIR$/../build.gradle" external.system.id="GRADLE" type="JAVA_MODULE" version="4"> | |||
<component name="FacetManager"> | |||
<facet type="android" name="Android"> | |||
<configuration> | |||
<option name="ALLOW_USER_CONFIGURATION" value="false" /> | |||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | |||
</configuration> | |||
</facet> | |||
<facet type="android-gradle" name="Android-Gradle"> | |||
<configuration> | |||
<option name="GRADLE_PROJECT_PATH" value=":demo" /> | |||
</configuration> | |||
</facet> | |||
</component> | |||
<component name="NewModuleRootManager" inherit-compiler-output="false"> | |||
<output url="file://$MODULE_DIR$/build/classes/debug" /> | |||
<exclude-output /> | |||
<content url="file://$MODULE_DIR$"> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" isTestSource="true" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/apk" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/assets" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/bundles" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/classes" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/exploded-bundles" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/incremental" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/libs" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/manifests" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/symbols" /> | |||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | |||
</content> | |||
<orderEntry type="jdk" jdkName="Android 4.2.2" jdkType="Android SDK" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
<orderEntry type="library" name="support-v4-13.0.0" level="project" /> | |||
<orderEntry type="library" name="library.aar" level="project" /> | |||
</component> | |||
</module> | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<fragment xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:map="http://schemas.android.com/apk/res-auto" | |||
android:id="@+id/map" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:name="com.google.android.gms.maps.SupportMapFragment"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
<string name="app_name">Maps Utils Demo</string> | |||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
package com.google.maps.android.utils; | |||
|
|||
import android.os.Bundle; | |||
import android.support.v4.app.FragmentActivity; | |||
import com.google.android.gms.maps.GoogleMap; | |||
import com.google.android.gms.maps.SupportMapFragment; | |||
|
|||
public class MainActivity extends FragmentActivity { | |||
private GoogleMap mMap; | |||
|
|||
@Override | |||
public void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.main); | |||
setUpMapIfNeeded(); | |||
} | |||
|
|||
@Override | |||
protected void onResume() { | |||
super.onResume(); | |||
setUpMapIfNeeded(); | |||
} | |||
|
|||
private void setUpMapIfNeeded() { | |||
if (mMap != null) { | |||
return; | |||
} | |||
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap(); | |||
if (mMap == null) { | |||
return; | |||
} | |||
// Initialize map options. For example: | |||
// mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID); | |||
} | |||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
include 'library' | |||
include 'demo' |