[android] Adding builder pattern for LocationComponent activation (#13941)

* initial additions of activation builder

* [android] refactoring LocationComponentActivationOptions based on code review

* [android] initial addition of LocationComponentActivationOptionsTest unit tests

* [android] more refactoring based on code review

* [android] refactoring test app location examples

* [android] espresso test refactor with LocationComponentActivationOptions usage

* [android] locationComponent builder instrumentation test tweaks and log removal

* [android] method and docs refactoring based @lukaspaczos 's review

* [android] locationEngine setting logic refactor

* [android] add null locationEngine to stillStaleAfterResuming test

* added .locationEngine(null) to other tests

* [android] javadocs, method, and test adjustments based on @lukaspaczos review

* [android] test tweaks based on Lukasz review
This commit is contained in:
Langston Smith
2019-03-05 11:05:06 -08:00
committed by GitHub
parent b29704cd1f
commit 7e4824960c
14 changed files with 984 additions and 147 deletions

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="0dp"
app:mapbox_uiAttribution="false"/>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -75,6 +75,7 @@
<string name="description_location_modes">Showcases location render and tracking modes</string>
<string name="description_location_fragment">Uses LocationComponent in a Fragment</string>
<string name="description_location_manual">Force location updates and don\'t rely on the engine</string>
<string name="description_location_activation_builder">Use LocationComponentActivationOptions to set options</string>
<string name="description_recyclerview">Show a MapView as a recyclerView item</string>
<string name="description_nested_viewpager">Show a MapView inside a viewpager inside a recyclerView</string>
</resources>

View File

@@ -75,6 +75,7 @@
<string name="activity_location_modes">Location Modes Activity</string>
<string name="activity_location_fragment">Location Fragment</string>
<string name="activity_location_manual">Manual Location updates</string>
<string name="activity_location_activation_builder">Build Location Activation</string>
<string name="activity_recyclerview">RecyclerView</string>
<string name="activity_nested_viewpager">Nested ViewPager</string>
</resources>