summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-11-28 18:40:50 +0100
committerGitHub <noreply@github.com>2016-11-28 18:40:50 +0100
commitb57b3b4bf6841be5604c54c94db6b9d822d985e1 (patch)
tree6883376e35d54b9e957ae0ae14dc13d2da21b5fc /platform/android/MapboxGLAndroidSDK
parent4fe071b518e792fdf069eb81ac326cf0f27f5e73 (diff)
downloadqtlocation-mapboxgl-b57b3b4bf6841be5604c54c94db6b9d822d985e1.tar.gz
[android] - Explicitly use hardware layer when (#7186)
animating the CompassView alpha.
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
index 352a76d834..5e54354dfa 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
@@ -125,10 +125,12 @@ public final class CompassView extends ImageView implements Runnable {
public void run() {
if (isFacingNorth() && fadeCompassViewFacingNorth) {
resetAnimation();
- fadeAnimator = ViewCompat.animate(CompassView.this).alpha(0.0f).setDuration(TIME_FADE_ANIMATION).withLayer();
+ setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ fadeAnimator = ViewCompat.animate(CompassView.this).alpha(0.0f).setDuration(TIME_FADE_ANIMATION);
fadeAnimator.setListener(new ViewPropertyAnimatorListenerAdapter() {
@Override
public void onAnimationEnd(View view) {
+ setLayerType(LAYER_TYPE_NONE, null);
setVisibility(View.INVISIBLE);
resetAnimation();
}