diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2018-01-26 15:32:16 +0100 |
---|---|---|
committer | Tobrun <tobrun.van.nuland@gmail.com> | 2018-02-13 10:06:55 +0100 |
commit | 009cc38c0d0cb7097c0bbc7bbf084a54d38f06e2 (patch) | |
tree | 13cd213f0c8f632c1da18c3a5a66049fcb51e14b /platform/android/MapboxGLAndroidSDKTestApp/src/main/res | |
parent | 6afff00ed41e0a143b5eacc2a71a9bd70878da5c (diff) | |
download | qtlocation-mapboxgl-upstream/tvn-transparent-textureview.tar.gz |
[android] - translucent surface on TextureViewupstream/tvn-transparent-textureview
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/res')
6 files changed, 74 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/water.jpg b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/water.jpg Binary files differnew file mode 100644 index 0000000000..71b758b490 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/water.jpg diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_resize.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_resize.xml index 2baa3d39dd..b00076e779 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_resize.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_resize.xml @@ -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" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_transparent.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_transparent.xml new file mode 100644 index 0000000000..3b9ee71359 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_textureview_transparent.xml @@ -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> + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/no_bg_style.json b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/no_bg_style.json new file mode 100644 index 0000000000..964eefc319 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/no_bg_style.json @@ -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" + } + ] +}
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml index e867046c80..51182f958c 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml @@ -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> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml index 47fee31c0a..078ccb64a9 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml @@ -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> |