I am facing the following issue when I am using PropertyValuesHolder.ofFloat(....)
PropertyValuesHolder: Couldn't find setter/getter for property < Property-name > with value type float
Other wise it is working good if I replace .ofFloat(...)
to ofInt(....)
By using ofInt(....), the animation is not animating smoothly.
I am also checked for solution posted PropertyValuesHolder: Couldn't find setter/getter for property alpha with value type float
But this solution won't work for me since I am applying the animation to the custom drawable.
Can and one explain what is reason for this error while using ofFloat(....). And what would be the alternate solution of this. Thanks in Advance.
Same problem here.
Solved that way:
final ObjectAnimator animScrollToBottom = ObjectAnimator.ofInt(AnimatorProxy.wrap(scrollView), "scrollY", fromPositionInt, toPositionInt).setDuration(500);
or with float values:
final ObjectAnimator animScrollToBottom = ObjectAnimator.ofFloat(scrollView, "y", fromPositionInt,toPositionInt).setDuration(500);
来源:https://stackoverflow.com/questions/17563973/propertyvaluesholder-couldnt-find-setter-getter-for-property-property-name-w