(筆記)
預設 TextView 有辦法跟著內容長高不會限制行數
在目標的 TextView 的 xml 加入這個屬性的設定就可以把內容限制在只顯示一行:
android:maxLines="1"
當限制行數時,預設的行為只會把內容切掉,不會顯示 ...
如果要加上後綴的 ...
,只要在 TextView 加上這個屬性的設定即可:
android:ellipsize="end"
More than 5 years have passed since last update.
(筆記)
預設 TextView 有辦法跟著內容長高不會限制行數
在目標的 TextView 的 xml 加入這個屬性的設定就可以把內容限制在只顯示一行:
android:maxLines="1"
當限制行數時,預設的行為只會把內容切掉,不會顯示 ...
如果要加上後綴的 ...
,只要在 TextView 加上這個屬性的設定即可:
android:ellipsize="end"
Register as a new user and use Qiita more conveniently