I'm trying to make the view bounds of a TextView fit exactly to the size of the text within.
(我正在尝试使TextView的视图范围完全适合其中的文本大小。)
(我摆弄了它,试图制作一个自定义的TextView来解决它,但是无法得到一个可靠的解决方案。)
Here are some resources that were useful but didn't quite do the trick for me:
(以下是一些有用的资源,但对我而言并不足够:)
(Android textview的视图范围比内容大得多,如何将其删除?)
(如何获取Textview文本下方空间的像素大小?)
((不是底部填充))
(Android FontMetrics中最高,上升,基线,下降,最低和领先的含义)
Is there a solid, reusable solution to this?
(是否有一个可靠的,可重用的解决方案?)
(谢谢!)
2.1m questions
2.1m answers
60 comments
57.0k users