[android] - decouple style loading from OnMapReady
This commit is contained in:
@@ -16,14 +16,6 @@
|
||||
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"
|
||||
app:mapbox_uiAttribution="false"
|
||||
app:mapbox_uiCompass="false"
|
||||
app:mapbox_uiLogo="false"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textZoom"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
app:mapbox_cameraTargetLng="7.497989"
|
||||
app:mapbox_cameraZoom="9"
|
||||
app:mapbox_cameraBearing="140"
|
||||
app:mapbox_cameraTilt="60"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
|
||||
app:mapbox_cameraTilt="60"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -7,5 +7,4 @@
|
||||
android:layout_height="match_parent"
|
||||
app:mapbox_cameraTargetLat="45.38301927899065"
|
||||
app:mapbox_cameraTargetLng="8.63525390625"
|
||||
app:mapbox_cameraZoom="7"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
|
||||
app:mapbox_cameraZoom="7"/>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_dark"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
|
||||
app:mapbox_localIdeographFontFamily="Droid Sans" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
|
||||
app:mapbox_uiAttribution="false" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<View
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/viewParent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.maplayout.SimpleMapActivity">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/viewParent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.maplayout.SimpleMapActivity">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:src="@drawable/ic_print"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
|
||||
app:backgroundTint="@color/accent"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
android:layout_height="match_parent"
|
||||
app:mapbox_cameraTargetLat="52.0907"
|
||||
app:mapbox_cameraTargetLng="5.1214"
|
||||
app:mapbox_cameraZoom="16"/>
|
||||
app:mapbox_cameraZoom="16"
|
||||
app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user