I am going to animate text size change using MotionLayout.
I do the following for start state
<CustomAttribute
motion:attributeName="textSize"
motion:customDimension="16sp" />
And the following for end state
<CustomAttribute
motion:attributeName="textSize"
motion:customDimension="14sp" />
As a result, it looks like size is actually changing, but it's much larger than 14sp-16sp
So, how to change text size properly?
Use sp for text size…
Go to File -> Settings, a new setting dialogue box will appear. Then go to Editor -> General. Now mark the checkbox Change font size with Ctrl + Mouse wheel and click on Apply button. Now to change your editor font size, you just have to press and hold Ctrl and rotate the Mouse wheel.
Try this
<CustomAttribute
motion:attributeName="textSize"
motion:customFloatValue="14" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With