Android: Animating SCALE_X and SCALE_Y on TextView looks choppy and not smooth

44 Views Asked by At

When animating small deltas for SCALE_X and SCALE_Y on TextViews, the results are choppy and don't look smooth.

To illustrate this problem, I have coded up a sample project here: https://github.com/blah1234/TextScaleApplication

Sample result looks like the screen record video here: example.mp4 (may need to download the mp4 file to get a high-resolution copy, rather than just viewing on the google photos album page)

The top TextView's SCALE_X and SCALE_Y properties are being animated from 1 to 1.067 over 5 seconds, while the TextView's SCALE_X and SCALE_Y properties are being animated from 1 to 1.5 over 5 seconds.

The top TextView's animation does not look smooth, and with individual characters shifting around leading to a choppy effect. It almost seems like the TextPaint is not anti-aliased, and it isn't able to blend pixels when drawing the text at various pixel locations.

The bottom TextView's animation is much smoother when animating over larger scale deltas.

Anybody know what is causing this artifact when animating small deltas? And is there a workaround?

1

There are 1 best solutions below