diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java index 2dea9f4945..717d4b58c5 100644 --- a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java +++ b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java @@ -90,7 +90,7 @@ public LottieAnimationView(Context context, AttributeSet attrs, int defStyleAttr private void init(@Nullable AttributeSet attrs) { TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.LottieAnimationView); String fileName = ta.getString(R.styleable.LottieAnimationView_lottie_fileName); - if (fileName != null) { + if (!isInEditMode() && fileName != null) { setAnimation(fileName); } if (ta.getBoolean(R.styleable.LottieAnimationView_lottie_autoPlay, false)) {