[android] - translucent surface on TextureView

This commit is contained in:
Tobrun
2018-01-26 15:32:16 +01:00
committed by Tobrun
parent 734b420649
commit 143c346d9d
17 changed files with 233 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@@ -7,7 +7,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"

View File

@@ -0,0 +1,28 @@
<?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">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"/>
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mapbox_cameraTargetLat="48.507879"
app:mapbox_cameraTargetLng="8.363795"
app:mapbox_cameraZoom="2"
app:mapbox_renderTextureMode="true"
app:mapbox_renderTextureTranslucentSurface="true"
app:mapbox_styleUrl="mapbox://styles/agerace-globant/cja02de7193b02suvy4gpbt2c"/>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,43 @@
{
"version": 8,
"name": "Land",
"metadata": {
"mapbox:autocomposite": true,
},
"sources": {
"composite": {
"url": "mapbox://mapbox.mapbox-terrain-v2",
"type": "vector"
}
},
"sprite": "mapbox://sprites/mapbox/mapbox-terrain-v2",
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"layers": [
{
"layout": {
"visibility": "visible"
},
"type": "fill",
"source": "composite",
"id": "admin",
"paint": {
"fill-color": "hsl(359, 100%, 50%)",
"fill-opacity": 1
},
"source-layer": "landcover"
},
{
"layout": {
"visibility": "visible"
},
"type": "fill",
"source": "composite",
"id": "layer-0",
"paint": {
"fill-opacity": 1,
"fill-color": "hsl(359, 100%, 50%)"
},
"source-layer": "Layer_0"
}
]
}

View File

@@ -67,6 +67,7 @@
<string name="description_textureview_debug">Use TextureView to render the map</string>
<string name="description_textureview_resize">Resize a map rendered on a TextureView</string>
<string name="description_textureview_animate">Animate a map rendered on a TextureView</string>
<string name="description_textureview_transparent">Enable a transparent surface on TextureView</string>
<string name="description_grid_source">Example Custom Geometry Source</string>
<string name="description_local_glyph">Suzhou using Droid Sans for Chinese glyphs</string>
<string name="description_hillshade">Example raster-dem source and hillshade layer</string>

View File

@@ -67,6 +67,7 @@
<string name="activity_textureview_debug">TextureView debug</string>
<string name="activity_textureview_resize">TextureView resize</string>
<string name="activity_textureview_animate">TextureView animation</string>
<string name="activity_textureview_transparent">TextureView transparent background</string>
<string name="activity_grid_source">Grid Source</string>
<string name="activity_local_glyph">Local CJK glyph generation</string>
<string name="activity_hillshade">Hillshade</string>