Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@Klox
Copy link

@Klox Klox commented Feb 8, 2022

If the view's dimensions grow, the text size did not grow because AutoFitTextView was using its existing dimensions as a maximum size. Now it retains the maximum dimensions set by its parent during the measure pass.

A sample activity is included to show the AutoFitTextView adjusting to the size constraints imposed by its parent. Without the above change, the text size would shrink but never grow.

While testing, I noticed that setting the text size to X would result in an actual text size of X-1 if there were no size constraints, so I fixed binarySearch.

@AndroidDeveloperLB
Copy link
Owner

I can't see the sample. Please show before&after the change (meaning 2 samples and 2 screenshots/videos), to make it clear what was fixed.

@Klox
Copy link
Author

Klox commented Feb 9, 2022

Why can't you see the sample? What have you tried?
If you run the sample activity with your existing library you will see the text size shrink and never grow. The library with my change will grow as the view's size increases.

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

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.