[android] 8.2.0 QA fixes for the test app

This commit is contained in:
Łukasz Paczos
2019-07-19 18:02:28 +02:00
committed by Łukasz Paczos
parent fd8891c12c
commit d48ec27696
7 changed files with 15304 additions and 11293 deletions

View File

@@ -85,6 +85,7 @@ public class PressForMarkerActivity extends AppCompatActivity {
if (mapboxMap == null) {
return;
}
markerList.clear();
mapboxMap.removeAnnotations();
}

View File

@@ -14,18 +14,30 @@ import kotlinx.android.synthetic.main.activity_backstack_fragment.*
*/
class FragmentBackStackActivity : AppCompatActivity() {
companion object {
private const val FRAGMENT_TAG = "map_fragment"
}
private lateinit var mapFragment: SupportMapFragment
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_backstack_fragment)
mapFragment = SupportMapFragment.newInstance()
mapFragment.getMapAsync { initMap(it) }
if (savedInstanceState == null) {
mapFragment = SupportMapFragment.newInstance()
mapFragment.getMapAsync { initMap(it) }
supportFragmentManager.beginTransaction().apply {
add(R.id.container, mapFragment)
}.commit()
supportFragmentManager.beginTransaction().apply {
add(R.id.container, mapFragment, FRAGMENT_TAG)
}.commit()
} else {
supportFragmentManager.findFragmentByTag(FRAGMENT_TAG)?.also { fragment ->
if (fragment is SupportMapFragment) {
fragment.getMapAsync { initMap(it) }
}
}
}
button.setOnClickListener { handleClick() }
}

View File

@@ -104,7 +104,7 @@ class DraggableMarkerActivity : AppCompatActivity() {
}
draggableSymbolsManager = DraggableSymbolsManager(
mapView, mapboxMap, featureCollection, source, layerId, 0, actionBarHeight)
mapView, mapboxMap, featureCollection, source, layerId, actionBarHeight, 0)
// Adding symbol drag listeners
draggableSymbolsManager?.addOnSymbolDragListener(object : DraggableSymbolsManager.OnSymbolDragListener {

View File

@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.testapp.activity.textureview;
import android.view.MenuItem;
import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.activity.maplayout.DebugModeActivity;
@@ -18,19 +17,6 @@ public class TextureViewDebugModeActivity extends DebugModeActivity implements O
return mapboxMapOptions;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// activity uses singleInstance for testing purposes
// code below provides a default navigation when using the app
onBackPressed();
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
// activity uses singleInstance for testing purposes

View File

@@ -2,7 +2,8 @@
"version": 8,
"name": "Satellite",
"metadata": {
"mapbox:autocomposite": true
"mapbox:autocomposite": true,
"mapbox:type": "default"
},
"sources": {
"mapbox": {
@@ -11,7 +12,7 @@
"tileSize": 256
}
},
"sprite": "mapbox://sprites/mapbox/satellite-v8",
"sprite": "mapbox://sprites/mapbox/satellite-v9",
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"layers": [
{
@@ -27,5 +28,11 @@
"source": "mapbox",
"source-layer": "mapbox_satellite_full"
}
]
],
"created": "1970-01-01T00:00:00.000Z",
"modified": "1970-01-01T00:00:00.000Z",
"owner": "mapbox",
"id": "satellite-v9",
"draft": false,
"visibility": "public"
}