【发布时间】:2012-02-04 00:16:16
【问题描述】:
我正在尝试执行以下操作:
给定最大尺寸(例如 400x400)。制作大小不同的文本以填充空间。例如,如果所需的文本是“A”,它的 textSize 值会很高,但如果我输入一个长句子,它的 textSize 应该减小以适应大小。
可以轻松实现吗?谢谢
【问题讨论】:
标签: java android android-layout textview
我正在尝试执行以下操作:
给定最大尺寸(例如 400x400)。制作大小不同的文本以填充空间。例如,如果所需的文本是“A”,它的 textSize 值会很高,但如果我输入一个长句子,它的 textSize 应该减小以适应大小。
可以轻松实现吗?谢谢
【问题讨论】:
标签: java android android-layout textview
取决于您的经验水平。 “容易”是主观的。 implementations 提供了不错的起点。
【讨论】:
Give the textview fill_parent hight and width so that as you type e.g ASDF then it will automatically reduce size and if only "A" then it will show max hight and widht.
This textview will set in layout which hight and width you will set as you want like 400*400.
If any double catch me..
最好的 V.k
【讨论】: