Android single line TextView without the dots

只愿长相守 提交于 2019-12-04 17:32:28

问题


Is it possible to have a single line TextView that cuts off at the nearest pixel and does not add three dots?


回答1:


<TextView
    android:id="@+id/text_ivew"
    style="@style/Text.Title"
    singleLine="false"
    android:ellipsize="end"
    android:lines="1"
    android:text="text"></TextView>



回答2:


You should just be able to set the android:ellipsize property to false on your TextView in xml.



来源:https://stackoverflow.com/questions/4831529/android-single-line-textview-without-the-dots

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!