diff --git a/library/src/com/nineoldandroids/animation/PropertyValuesHolder.java b/library/src/com/nineoldandroids/animation/PropertyValuesHolder.java index 8e2fb30..6fb1823 100644 --- a/library/src/com/nineoldandroids/animation/PropertyValuesHolder.java +++ b/library/src/com/nineoldandroids/animation/PropertyValuesHolder.java @@ -828,7 +828,17 @@ void setAnimatedValue(Object target) { return; } if (mProperty != null) { - mProperty.set(target, mIntAnimatedValue); + try { + if (mProperty instanceof IntProperty) { + ((IntProperty) mProperty).set(target, mIntAnimatedValue); + } else if (mProperty instanceof FloatProperty) { + ((FloatProperty) mProperty).set(target, (float) mIntAnimatedValue); + } else { + mProperty.set(target, mIntAnimatedValue); + } + } catch (ClassCastException e) { + Log.e("PropertyValuesHolder", e.toString()); + } return; } //if (mJniSetter != 0) {