This is an error in the example given in the documentation.
Try changing android:valueType="intType" to android:valueType="floatType" .
It works in the case of @RaymondChenon , since it does not explicitly change android:valueType to int , so the system accepts a default float
The problem is that you are providing android:valueType="intType" in the animator , which should be android:valueType="floatType" for the android:propertyName="x" that you are animating.
While running, find the setter for the property you want to animate. As in your case, it will look for setX() , but since you determine the type of an argument of type int , it causes a mismatch, since there is no such method, I don’t know why this does not fail.
Look at the properties of the View class, there is a setX (float) method
For further understanding you can contact fooobar.com/questions/540581 / ...
Deltacap
source share