[英]How to cut off (delete) checkbox-text at newline in Android?
嘗試使用文本視圖的ellipsize和max Lines屬性作為:
<TextView
android:id="@+id/textViewPostTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AppCompat.Title"
android:ellipsize="end"
android:maxLines="1"
android:text="This is our title"/>
如果超過當前行,則ellipsize將在文本末尾設置點(...)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.