Auto Size TextView - it´s possible?

Hi, I want to make that when the content of a text box fill the width of the screen, it reduces it´s Font size so it can continue showing the rest of the text, without multilines.

I show what I´m looking to achieve:

Example calculator app

When the numbers fill the display, the font reduces so it can be enter another number.

I was thinking if there is an easy way to achieve that? or I should make a list with all the width in pixels of each number and calculate how many enter in the screen with the different font sized depending the screen width?

any help welcome, thanks

Yeah I saw that but I think it don´t work for what I´m trying to do.

I found a possible solution using the width of a label to know when the text get the width of the screen and then run a loop with a clock to reduce the font by 1 each time, I don´t know if this is the rigth solution.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.