2012-02-03 23 views
0

我試圖執行以下操作:根據可用空間自我調整文本大小

給定最大尺寸(例如400x400)。製作大小不一的文字以填充空格。例如,如果所需的文本是「A」,它將具有較高的textSize值,但是如果我放了一個長句子,它的textSize應該減小以適應大小。

是否可以輕鬆實現?謝謝

回答

1

取決於您的經驗水平。 「輕鬆」是主觀的。有implementations那裏提供體面的起始位置。

1
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

相關問題