Skip to content

Question: Can the same logic here work for auto-resizing TextViews ? #1

Description

@AndroidDeveloperLB

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions