How to create a text box that automatically resizes the font to fit the space?

I am wondering how I can create or use, if there is a TextView function, to automatically resize the font to fit this place.

Sometimes it needs to be larger, if any, and sometimes it needs to be reduced in font size to fit the space.

What do you say?

+7
source share
1 answer

you can change the font in your overridden version

protected void onSizeChanged (int w, int h, int oldw, int oldh) 

. To do this, just subclass the TextView.

Also check this one .

+2
source

All Articles