-
Notifications
You must be signed in to change notification settings - Fork 54
Question: Can the same logic here work for auto-resizing TextViews ? #1
Description
I've searched in so many repositories and samples for a way to auto-resize the textView font size (and line count) to fit into its boundaries.
All solutions don't work well: text gets truncated, part of a word goes to next line, ...
Some solutions work, but only if the TextView has a single line of text that it can show.
My question:
As this sample seems to work very well, is it possible to use a similar logic, and put it in a library that handles TextView's font and line count?
Here's a library I've made that has almost what I need:
https://github.com/AndroidDeveloperLB/AutoFitTextView
But as I wrote, all solutions I've found do not work well.
What I'd like to achieve is to start from a specified max font size, increasing line count up to the max that was set, and when reaching the max line count, reduce the font size (till the min font size allowed) so that the text will fit the boundaries of the TextView.