[android] Expose pre-fetching zoom delta. (#15769)

* [android] Expose pre-fetching zoom delta.

* [android] Fix Clang format.

* [android] Add MapboxMap unit test.

* [android] Add prefetching zoom delta into MapboxMapOptions.

* [android] Deprecate setPrefetchesTiles to migrate to setPrefetchZoomDelta.

* [android] Deprecate getPrefetchesTiles() and migrate to setPrefetchZoomDelta().

* [android] Add unit test to NativeMapViewTest.

* [android] Add IntRange annotation to getPrefetchZoomDelta.
This commit is contained in:
Peng Liu
2019-10-08 16:21:46 +03:00
committed by GitHub
parent 4eaaa9046e
commit 7139abdbf5
11 changed files with 262 additions and 96 deletions

View File

@@ -221,6 +221,23 @@ class NativeMapViewTest : AppCenter() {
assertEquals("Flag should match", expected, actual)
}
@Test
@UiThreadTest
fun testPrefetchZoomDelta() {
val expected = 2
nativeMapView.prefetchZoomDelta = 2
val actual = nativeMapView.prefetchZoomDelta
assertEquals("Prefetch zoom delta should match", expected, actual)
}
@Test
@UiThreadTest
fun testPrefetchZoomDeltaDefault() {
val expected = 4
val actual = nativeMapView.prefetchZoomDelta
assertEquals("Prefetch zoom delta should match", expected, actual)
}
@Test
@UiThreadTest
fun testSetContentPadding() {