diff --git a/lottie/src/main/java/com/airbnb/lottie/model/layer/SolidLayer.java b/lottie/src/main/java/com/airbnb/lottie/model/layer/SolidLayer.java index 20b0f448d9..19e7d53bd3 100644 --- a/lottie/src/main/java/com/airbnb/lottie/model/layer/SolidLayer.java +++ b/lottie/src/main/java/com/airbnb/lottie/model/layer/SolidLayer.java @@ -42,9 +42,6 @@ public class SolidLayer extends BaseLayer { return; } - int opacity = transform.getOpacity() == null ? 100 : transform.getOpacity().getValue(); - int alpha = (int) (parentAlpha / 255f * (backgroundAlpha / 255f * opacity / 100f) * 255); - paint.setAlpha(alpha); Integer color = colorAnimation == null ? null : colorAnimation.getValue(); if (color != null) { paint.setColor(color); @@ -52,6 +49,10 @@ public class SolidLayer extends BaseLayer { paint.setColor(layerModel.getSolidColor()); } + int opacity = transform.getOpacity() == null ? 100 : transform.getOpacity().getValue(); + int alpha = (int) (parentAlpha / 255f * (backgroundAlpha / 255f * opacity / 100f) * 255); + paint.setAlpha(alpha); + if (colorFilterAnimation != null) { paint.setColorFilter(colorFilterAnimation.getValue()); }