summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-06-26 15:48:53 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2019-06-26 19:22:04 +0200
commit6aa0792977065e3a315759846a3b5d3a72ea8f3a (patch)
tree6f7d0b178a2947bf3025d35ad40146bf38e5fd86 /platform
parent962311a0dc6bd2063e8e20b6c28e1a570d948e90 (diff)
downloadqtlocation-mapboxgl-6aa0792977065e3a315759846a3b5d3a72ea8f3a.tar.gz
[android] - bring back opacity manual regression test
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
index 243fa67ec4..689ce1f0a7 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
@@ -43,7 +43,9 @@ import static com.mapbox.mapboxsdk.style.expressions.Expression.format;
import static com.mapbox.mapboxsdk.style.expressions.Expression.formatEntry;
import static com.mapbox.mapboxsdk.style.expressions.Expression.get;
import static com.mapbox.mapboxsdk.style.expressions.Expression.literal;
+import static com.mapbox.mapboxsdk.style.expressions.Expression.match;
import static com.mapbox.mapboxsdk.style.expressions.Expression.rgb;
+import static com.mapbox.mapboxsdk.style.expressions.Expression.stop;
import static com.mapbox.mapboxsdk.style.expressions.Expression.switchCase;
import static com.mapbox.mapboxsdk.style.expressions.Expression.toBool;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconAllowOverlap;
@@ -51,6 +53,7 @@ import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconAnchor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconColor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconIgnorePlacement;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconImage;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconOpacity;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconSize;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textAllowOverlap;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textAnchor;
@@ -198,6 +201,12 @@ public class SymbolLayerActivity extends AppCompatActivity implements MapboxMap.
// use DDS
boolean selected = feature.getBooleanProperty(SELECTED_FEATURE_PROPERTY);
feature.addBooleanProperty(SELECTED_FEATURE_PROPERTY, !selected);
+
+ // validate symbol flicker regression for #13407
+ markerSymbolLayer.setProperties(iconOpacity(match(
+ get(ID_FEATURE_PROPERTY), literal(1.0f),
+ stop(feature.getStringProperty("id"), selected ? 0.3f : 1.0f)
+ )));
}
}
markerSource.setGeoJson(markerCollection);