I have a TextView
for which i register the following animation:
mScaleAnimation = new ScaleAnimation(1f, 1.2f, 1f, 1.2f,
mReferenceTextView.getWidth() / 2, mReferenceTextView
.getHeight() / 2);
mScaleAnimation.setRepeatCount(Animation.INFINITE);
mScaleAnimation.setRepeatMode(Animation.REVERSE);
mScaleAnimation.setDuration(500);
It works fine and looks really cool :)
My only concern is the following: When i look at logcat, it is totally unusable since as long as the animation ist running, i keep getting these logs over and over multiple times a second :(
06-20 17:50:05.555: DEBUG/skia(14179): purging 213K from font cache [7 entries]
06-20 17:50:05.750: DEBUG/skia(14179): purging 196K from font cache [7 entries]
06-20 17:50:05.870: DEBUG/skia(14179): purging 202K from font cache [8 entries]
06-20 17:50:05.995: DEBUG/skia(14179): purging 190K from font cache [8 entries]
The TextView
uses a custom font/typeface (which is in otf format).
Any ideas what causes that heavy work for the font cache?
I believe that your cache is getting killed because you are generating tons of TypeFace objects. I'm guessing that this is on a pre ICS release? There is a bug that holds TypeFaces and does not free it up correctly. So when your animating, it keeps creating new objects for each position and they are leaked and never cleaned up.
I found someone's suggestion to create a TypeFace cache with a HashMap. You can check this post out for more details. Custom fonts and XML layouts (Android)
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