Java 根据可用房间自动调整文本大小

Java 根据可用房间自动调整文本大小,java,android,android-layout,textview,Java,Android,Android Layout,Textview,我正在努力做到以下几点: 给定最大尺寸(例如400x400)。制作大小不同的文本以填充空间。例如,如果所需的文本是“A”,它将有一个较高的textSize值,但如果我放一个长句,它的textSize应该减小以适应大小 有可能很容易实现吗?谢谢这取决于你的经验水平。“容易”是主观的。有很多地方提供了不错的起点 Give the textview fill_parent hight and width so that as you type e.g ASDF then it will automat

我正在努力做到以下几点:

给定最大尺寸(例如400x400)。制作大小不同的文本以填充空间。例如,如果所需的文本是“A”,它将有一个较高的textSize值,但如果我放一个长句,它的textSize应该减小以适应大小


有可能很容易实现吗?谢谢

这取决于你的经验水平。“容易”是主观的。有很多地方提供了不错的起点

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