Android Question Fit text in a EditText

fernando.oliboni

Active Member
Licensed User
Longtime User
1598383419906.png

How can I achieve this effect in an EditText?

Thank you
 
How can I achieve this effect in an EditText?
This class will do it for you: It has an example
I just used it recently.
 
Upvote 0
Ok, I'll see, but it seems to me that it adjusts the label to the new font size, I need the letter to fit the label. The label size must be fixed.
 
Upvote 0
Hi

Use my library:
Text Label Fitter

Usage:
just enter your Label Name want to fit text size (Like This):

B4X: Copy
Dim TLF As TextLabelFitter
TLF.FitText(Label1)

or

B4X: Copy
Dim TLF As TextLabelFitter

Label1.TextSize = TLF.TextSize(Label1) - 4

TLF.TextSize, return the maximum value for text size.

:cool::cool::cool::cool:
 

Attachments

Upvote 0
I need the letter to fit the label.
Take a look at the first column in the attached screenshot. It keeps the label width the same. It adjusts the size of the text to fit the label. Isn't that what you want There might be other solutions, if this is not suitable. If you want to keep the text in the same line, in the designer customview you check 'Single Line'
 

Attachments

  • AutoTextSizeLabel.png
    AutoTextSizeLabel.png
    23.8 KB · Views: 486
Upvote 0
Back
Top