This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
3,645 additions
and
0 deletions.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Gradle files | ||
.gradle/ | ||
|
||
# IntelliJ files | ||
.idea | ||
*.iml | ||
|
||
# Build files | ||
build/ | ||
*/build/ | ||
*.so | ||
|
||
# Local settings | ||
local.properties |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion "21.1.0" | ||
|
||
defaultConfig { | ||
applicationId "com.mapbox.mapboxgl.app" | ||
minSdkVersion 19 | ||
targetSdkVersion 20 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
runProguard false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile project(':lib') | ||
} |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<lint> | ||
<issue id="HardcodedDebugMode" severity="warning" /> | ||
</lint> |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.mapbox.mapboxgl.app" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-feature android:glEsVersion="0x00020000" /> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<application | ||
android:allowBackup="false" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
<activity | ||
android:name="com.mapbox.mapboxgl.app.MainActivity" | ||
android:label="@string/app_name" | ||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize"> | ||
</activity> | ||
<activity | ||
android:name="com.mapbox.mapboxgl.app.FragmentActivity" | ||
android:label="@string/app_name" | ||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
29 changes: 29 additions & 0 deletions
29
android/java/app/src/main/java/com/mapbox/mapboxgl/app/FragmentActivity.java
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.mapbox.mapboxgl.app; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
public class FragmentActivity extends Activity { | ||
|
||
// | ||
// Static members | ||
// | ||
|
||
// Tag used for logging | ||
private static final String TAG = "FragmentActivity"; | ||
|
||
// | ||
// Lifecycle events | ||
// | ||
|
||
// Called when activity is created | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
Log.v(TAG, "onCreate"); | ||
|
||
// Load the layout | ||
setContentView(R.layout.activity_fragment); | ||
} | ||
} |
98 changes: 98 additions & 0 deletions
98
android/java/app/src/main/java/com/mapbox/mapboxgl/app/MainActivity.java
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
package com.mapbox.mapboxgl.app; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import com.mapbox.mapboxgl.lib.MapView; | ||
|
||
public class MainActivity extends Activity { | ||
|
||
// | ||
// Static members | ||
// | ||
|
||
// Tag used for logging | ||
private static final String TAG = "MainActivity"; | ||
|
||
// The map | ||
private MapView mMapView; | ||
|
||
// | ||
// Lifecycle events | ||
// | ||
|
||
// Called when the activity is created | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
Log.v(TAG, "onCreate"); | ||
|
||
// Load the layout | ||
setContentView(R.layout.activity_main); | ||
mMapView = (MapView) findViewById(R.id.map); | ||
|
||
// Need to pass on any saved state to the map | ||
mMapView.onCreate(savedInstanceState); | ||
} | ||
|
||
// Called when the activity is destroyed | ||
@Override | ||
protected void onDestroy() { | ||
super.onDestroy(); | ||
Log.v(TAG, "onDestroy"); | ||
|
||
// Need to pass on to view | ||
mMapView.onDestroy(); | ||
} | ||
|
||
// Called when the activity is visible | ||
@Override | ||
protected void onStart() { | ||
super.onStart(); | ||
Log.v(TAG, "onStart"); | ||
|
||
// Need to pass on to view | ||
mMapView.onStart(); | ||
} | ||
|
||
// Called when the activity is invisible | ||
@Override | ||
protected void onStop() { | ||
super.onStop(); | ||
Log.v(TAG, "onStop"); | ||
|
||
// Need to pass on to view | ||
mMapView.onStop(); | ||
} | ||
|
||
// Called when the activity is in the background | ||
@Override | ||
protected void onPause() { | ||
super.onPause(); | ||
Log.v(TAG, "onPause"); | ||
|
||
// Need to pass on to view | ||
mMapView.onPause(); | ||
} | ||
|
||
// Called when the activity is no longer in the background | ||
@Override | ||
protected void onResume() { | ||
super.onResume(); | ||
Log.v(TAG, "onResume"); | ||
|
||
// Need to pass on to view | ||
mMapView.onResume(); | ||
} | ||
|
||
// Called before activity is destroyed | ||
@Override | ||
protected void onSaveInstanceState(Bundle outState) { | ||
Log.v(TAG, "onSaveInstanceState"); | ||
|
||
// Need to retrieve any saved state from the map | ||
mMapView.onSaveInstanceState(outState); | ||
super.onSaveInstanceState(outState); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
android/java/app/src/main/res/layout/activity_fragment.xml
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<merge xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
tools:context="${packageName}.${activityClass}" > | ||
|
||
<fragment | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
class="com.mapbox.mapboxgl.lib.MapFragment" | ||
android:id="@+id/map_fragment" /> | ||
|
||
</merge> |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<merge xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
tools:context="${packageName}.${activityClass}" > | ||
|
||
<view | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
class="com.mapbox.mapboxgl.lib.MapView" | ||
android:id="@+id/map" /> | ||
|
||
</merge> |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<resources> | ||
|
||
<!-- | ||
Base application theme for API 11+. This theme completely replaces | ||
AppBaseTheme from res/values/styles.xml on API 11+ devices. | ||
--> | ||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light"> | ||
<!-- API 11 theme customizations can go here. --> | ||
</style> | ||
|
||
</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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<resources> | ||
|
||
<!-- | ||
Base application theme for API 14+. This theme completely replaces | ||
AppBaseTheme from BOTH res/values/styles.xml and | ||
res/values-v11/styles.xml on API 14+ devices. | ||
--> | ||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> | ||
<!-- API 14 theme customizations can go here. --> | ||
</style> | ||
|
||
</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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">Mapbox GL</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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<resources> | ||
|
||
<!-- | ||
Base application theme, dependent on API level. This theme is replaced | ||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices. | ||
--> | ||
<style name="AppBaseTheme" parent="android:Theme.Light"> | ||
<!-- | ||
Theme customizations available in newer API levels can go in | ||
res/values-vXX/styles.xml, while customizations related to | ||
backward-compatibility can go here. | ||
--> | ||
</style> | ||
|
||
<!-- Application theme. --> | ||
<style name="AppTheme" parent="AppBaseTheme"> | ||
<!-- All customizations that are NOT specific to a particular API-level can go here. --> | ||
</style> | ||
|
||
</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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.13.2' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
} | ||
} |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Wed Apr 10 15:27:10 PDT 2013 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip |
Oops, something went wrong.