From 1c9d85e0de4df1f931e61e27518c6b05d7c016ef Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 9 Nov 2015 16:48:29 -0600 Subject: [PATCH 1/4] [android] #2931 - Adding Manual Zoom As Drawer Option --- .../ic_filter_center_focus_white_24dp.png | Bin 0 -> 251 bytes .../ic_filter_center_focus_white_24dp.png | Bin 0 -> 174 bytes .../ic_filter_center_focus_white_24dp.png | Bin 0 -> 270 bytes .../ic_filter_center_focus_white_24dp.png | Bin 0 -> 384 bytes .../ic_filter_center_focus_white_24dp.png | Bin 0 -> 497 bytes .../src/main/res/menu/menu_drawer.xml | 6 ++++++ .../src/main/res/values/strings.xml | 1 + 7 files changed, 7 insertions(+) create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_filter_center_focus_white_24dp.png create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_filter_center_focus_white_24dp.png create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_filter_center_focus_white_24dp.png create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_filter_center_focus_white_24dp.png create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_filter_center_focus_white_24dp.png diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_filter_center_focus_white_24dp.png b/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_filter_center_focus_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..38a4037e0394c867da96347caebaac532e9bbd69 GIT binary patch literal 251 zcmVST5Jh2vFiub!1^|`;(HVK46m$VPHhbwv$oV95LaF>+`ukaDfBUj5>4eB>ark{y z!cl$AjIrJ3ZQ7=Gzc0AasX`6rELJXOxevxpQz?fpa@W<+*C=&z$4Zl z-nC%f6SGp-AI*FS-(tm-BFCi-)Co{;0}WS!9s+c?p3-{2yzIADuzWDw;uh(F?CE7u zY9Q0=|0ig?>hrg?qxzZ#`P6!CbE0KC>L4ab)f@7IHLgyD#*_d6002ovPDHLkV1f;j BY>WT^ literal 0 HcmV?d00001 diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_filter_center_focus_white_24dp.png b/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_filter_center_focus_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..b3fdd44cc33ba9dd104b1aa0d2e206777dc1b802 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_+iQcoAh5R21SFFSHICQINt*^RaDr=O)?7RP% Yi)C(q=SX4B06Kud)78&qol`;+0L`*OdH?_b literal 0 HcmV?d00001 diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_filter_center_focus_white_24dp.png b/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_filter_center_focus_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..cd0e1d3fb931f3a6ab3d339acda6f69ee9e67395 GIT binary patch literal 270 zcmV+p0rCEcP)yNW~fSQ9G5L?fjP!6c9z)cRAtiZSRJ6sdM|r~+!z@t2v)wm9@h#eU<||7Kfk#MkZgMad2(^zaWeYVKu_YV*JxJd1=ylr U%*|$wZU6uP07*qoM6N<$f|q)8nE(I) literal 0 HcmV?d00001 diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_filter_center_focus_white_24dp.png b/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_filter_center_focus_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..d49e56e88d106cbbe21f2bb3594fd6e2d8eb635b GIT binary patch literal 384 zcmV-`0e}99P)qapaO!S475@M ztz{sm2Fhh1`G><3yx%|uGEfC$AOjhw%rqD<K;E500wHmE_ys}|az0ik-jpc$bix}Xc8PP(8wp$c8l?cG3ULLGHMQ$me(L487f z>w+SdylPIQ4N7qM`k}24is<4zoX@(}kAww}&1q|_AO7hv;Y2~fk#X5y`G4%x1~QO= z3}he!74P=6uu%hLGSEm3l*&L&4l1B6vHXd1UpZ*YN12VW$&fX9C7_&)lvuDa);|U^ ekbw+T|NH`fe@Dl6965&o00004oMMbF@$&ILk~yMz#Oh#@cuBZ4>ZC**+`+&e>76EnRznCt`ZA2N)1j-yUF2Of!3c4Kd{c=n*=(FYzNW z-P;2sQ9ooIdjQ8LWqZe21aw$ZroXgo0vtDl^ITaz(A?nzAODy2Bjq)V0}sy?_7C;6 z`Cv=2E$_5&W&nY8d7#gXoSYeb?rXS_(9N6x0tg_000IagfB*sraH@ZNotOfQ;sHHV zfaiEXiZ=uBT*Lz$nHj(ft_q;R&;;O{vj{+ekl}w6;CbQf|L%oSUKz7KI$+I+XD-6` nLdGXRjT1ls0R#|000I61ez(|mJ9T~+00000NkvXXu0mjfZve?z literal 0 HcmV?d00001 diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml b/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml index 592651ef881..9b905d3c0b2 100644 --- a/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml +++ b/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml @@ -90,6 +90,12 @@ android:icon="@drawable/ic_pin_drop_white_24dp" android:title="@string/action_press_for_marker" /> + + InfoWindow Adapter MapFragment Press For Marker + Manual Zoom InfoWindow Add Markers in bulk Set Visible Bounds From 69a2b06e210bdba41d837d2a74e072cdfbf63020 Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 9 Nov 2015 16:55:07 -0600 Subject: [PATCH 2/4] [android] #2931 - Creating basic Activity for Manual Zoom --- .../mapboxsdk/testapp/ManualZoomActivity.java | 88 +++++++++++++++++++ .../main/res/layout/activity_manual_zoom.xml | 19 ++++ 2 files changed, 107 insertions(+) create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/ManualZoomActivity.java create mode 100644 android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/ManualZoomActivity.java b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/ManualZoomActivity.java new file mode 100644 index 00000000000..841cfa6a695 --- /dev/null +++ b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/ManualZoomActivity.java @@ -0,0 +1,88 @@ +package com.mapbox.mapboxsdk.testapp; + +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.MenuItem; +import com.mapbox.mapboxsdk.constants.Style; +import com.mapbox.mapboxsdk.utils.ApiAccess; +import com.mapbox.mapboxsdk.views.MapView; + +public class ManualZoomActivity extends AppCompatActivity { + + private MapView mMapView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_manual_zoom); + + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + actionBar.setDisplayShowHomeEnabled(true); + } + + mMapView = (MapView) findViewById(R.id.manualZoomMapView); + mMapView.setAccessToken(ApiAccess.getToken(this)); + mMapView.setStyle(Style.MAPBOX_STREETS); + mMapView.onCreate(savedInstanceState); + } + + @Override + protected void onStart() { + super.onStart(); + mMapView.onStart(); + } + + @Override + public void onResume() { + super.onResume(); + mMapView.onResume(); + } + + @Override + public void onPause() { + super.onPause(); + mMapView.onPause(); + } + + @Override + protected void onStop() { + super.onStop(); + mMapView.onStop(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + mMapView.onSaveInstanceState(outState); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + mMapView.onDestroy(); + } + + @Override + public void onLowMemory() { + super.onLowMemory(); + mMapView.onLowMemory(); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + default: + return super.onOptionsItemSelected(item); + } + } +} diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml b/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml new file mode 100644 index 00000000000..70f38875a24 --- /dev/null +++ b/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml @@ -0,0 +1,19 @@ + + + + + + + + From 803d8bbd4e05eb6a1eb95ffdf47a49f747834d3c Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 9 Nov 2015 17:03:03 -0600 Subject: [PATCH 3/4] [android] #2931 - Making Manual Zoom Navigation Drawer Item Open Manual Zoom Activity --- .../MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml | 3 +++ .../main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java | 4 ++++ .../MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml | 1 + 3 files changed, 8 insertions(+) diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml b/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml index bb7052c6318..f01181fecaf 100644 --- a/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml +++ b/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml @@ -49,6 +49,9 @@ android:name=".PressForMarkerActivity" android:label="@string/activity_press_for_marker" /> + + diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java index 96384dc2b96..6c44a9344d5 100644 --- a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java +++ b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java @@ -349,6 +349,10 @@ public boolean onNavigationItemSelected(MenuItem menuItem) { startActivity(new Intent(getApplicationContext(), PressForMarkerActivity.class)); return true; + case R.id.action_manual_zoom: + startActivity(new Intent(getApplicationContext(), ManualZoomActivity.class)); + return true; + case R.id.action_bulk_markers: startActivity(new Intent(getApplicationContext(), BulkMarkerActivity.class)); return true; diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index e27799019cd..5b3b28a022a 100644 --- a/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -8,6 +8,7 @@ Map Fragment Activity Press For Marker Activity Add Bulk Markers Activity + Manual Zoom Activity InfoWindow Activity Visible Coordinate Bounds User tracking mode From 5747bee1b80c766e403c5231992224e790f4a06d Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 9 Nov 2015 17:07:51 -0600 Subject: [PATCH 4/4] [android] #2931 - Adding Zoom button to UI --- .../src/main/res/layout/activity_manual_zoom.xml | 7 +++++++ .../src/main/res/values/strings.xml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml b/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml index 70f38875a24..b5496820628 100644 --- a/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml +++ b/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_manual_zoom.xml @@ -16,4 +16,11 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> +