PropertyValuesHolder:找不到属性< property-name>的设置器/获取器。值类型为float [英] PropertyValuesHolder: Couldn't find setter/getter for property <property-name> with value type float

查看:214
本文介绍了PropertyValuesHolder:找不到属性< property-name>的设置器/获取器。值类型为float的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 PropertyValuesHolder.ofFloat(....)

时遇到以下问题

PropertyValuesHolder:找不到属性<的设置器/获取器。
属性名称>值类型为float

PropertyValuesHolder: Couldn't find setter/getter for property < Property-name > with value type float

否则,如果替换 .ofFloat(...) ofInt(....)

通过使用ofInt(....),动画不能动画流畅。

By using ofInt(....), the animation is not animating smoothly.

我还检查了 PropertyValuesHolder:找不到值类型为float

但是此解决方案对我不起作用,因为我将动画应用于自定义可绘制对象。

But this solution won't work for me since I am applying the animation to the custom drawable.

可以和一个说明使用ofFloat(....)时此错误的原因是什么。而这的替代解决方案是什么。

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.

推荐答案

这里有同样的问题。

解决了那个问题方式:

final ObjectAnimator animScrollToBottom = ObjectAnimator.ofInt(AnimatorProxy.wrap(scrollView), "scrollY", fromPositionInt, toPositionInt).setDuration(500);

或具有浮点值:

final ObjectAnimator animScrollToBottom = ObjectAnimator.ofFloat(scrollView, "y", fromPositionInt,toPositionInt).setDuration(500);

这篇关于PropertyValuesHolder:找不到属性&lt; property-name&gt;的设置器/获取器。值类型为float的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆