From f483ac224d546e5e3905a8f228d7618526f70dda Mon Sep 17 00:00:00 2001 From: Rait Maltsaar Date: Mon, 4 Apr 2016 11:17:48 +0300 Subject: [PATCH] Fixed accidental API 19 usage Changed isAttachedToWindow to ViewCompat.isAttachedToWindow() --- .../viewpropertyobjectanimator/ViewPropertyObjectAnimator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator.java b/library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator.java index 81c86b8..131dad9 100644 --- a/library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator.java +++ b/library/src/main/java/com/bartoszlipinski/viewpropertyobjectanimator/ViewPropertyObjectAnimator.java @@ -23,6 +23,7 @@ import android.annotation.SuppressLint; import android.os.Build; import android.support.v4.util.ArrayMap; +import android.support.v4.view.ViewCompat; import android.util.Property; import android.view.View; import android.view.animation.Interpolator; @@ -823,7 +824,7 @@ public void onAnimationStart(Animator animation) { View view = mView.get(); mCurrentLayerType = view.getLayerType(); view.setLayerType(View.LAYER_TYPE_HARDWARE, null); - if(view.isAttachedToWindow()) { + if(ViewCompat.isAttachedToWindow(view)) { view.buildLayer(); } }