我将使用 MotionLayout 为文本大小更改设置动画。
我为开始状态执行以下操作
<CustomAttribute
motion:attributeName="textSize"
motion:customDimension="16sp" />
Run Code Online (Sandbox Code Playgroud)
以及以下结束状态
<CustomAttribute
motion:attributeName="textSize"
motion:customDimension="14sp" />
Run Code Online (Sandbox Code Playgroud)
结果,看起来大小实际上在变化,但它比14sp-16sp大得多
那么,如何正确改变文字大小呢?