Skip to content

A TextView that automatically fit its font and line count based on its available size and content

License

Notifications You must be signed in to change notification settings

mwajeeh/AutoFitTextView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoFitTextView

A TextView that automatically fit its font and line count based on its available size and content

This code is heavily based on this StackOverflow thread.

The sample shows how the library can handle various parameters being changed on the TextView: width, height, number of lines allowed, and the content (text) itself. You can play with the various properties to see how the library handle them.

Note that even though the sample is of API 16, it should work fine on most cases for much older versions.

This is not a requirement though. It's more of a suggestion, because older versions might have issues as a cause of this known bug, which affects API 12-15 (including).

About

A TextView that automatically fit its font and line count based on its available size and content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published