I'm trying to make the view bounds of a TextView fit exactly to the size of the text within. I have fiddled around with it, trying to make a custom TextView to solve it, but couldn't get a solid solution.
Here are some resources that were useful but didn't quite do the trick for me:
- Android textview's view bounds are much larger than content, how to remove it?
- How can I get the size in pixels of the space below the text of a textview? (not the bottom padding)
- Meaning of top, ascent, baseline, descent, bottom, and leading in Android's FontMetrics
Is there a solid, reusable solution to this? Thank you!