Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the option to leave it as it is if the actual text size fits the space #2

Open
demetrio812 opened this issue Dec 10, 2017 · 2 comments

Comments

@demetrio812
Copy link

Hello,
I'm testing the plugin in Android and it's very useful (thank you!), the only problem is caused to me by this line:

textField.setTextSize(200);

This will alway try to make the text to the maximum size available, that is cool, but it doesn't consider the label height so in real life layout it make the component unusable.

For example let's say I have a name that most of the time fits the available space but I want to lower the font only in case it doesn't: with that text size size it will alway try to use the available space, so if the name is very small it will become massive.

If we remove that line the current font size is kept and it will start resizing only if the text doesn't fit.

Hopefully I've explained the issue :)

Is it possible to have this 2 ways as an option to pass to the component?

Do you agree with this? I can send a pull request as soon as I have a bit of free time if you agree

Cheers,
Dem

@danielgek
Copy link
Collaborator

Hi, @demetrio812 i understand the problem(someone on slack also told me something similar), i'm happy to accept PR's ;)

@gabrielsmelo
Copy link

Any update about this issue?
Would be nice to have the option to leave the size as it is, and lower only in the case it doesn't fit.

finger563 added a commit to Max-Mobility/nativescript-auto-fit-text that referenced this issue Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants