Android single line TextView without the dots
28,285
Solution 1
<TextView
android:id="@+id/text_ivew"
style="@style/Text.Title"
singleLine="false"
android:ellipsize="end"
android:lines="1"
android:text="text"></TextView>
Solution 2
You should just be able to set the android:ellipsize property to false on your TextView in xml.
Related videos on Youtube
Author by
700 Software
Join 700.social ! A happy medium between Facebook and Gab. :) The name is too long but the domain looks good. Also, Software Development / Consulting (423) 802-8971 700software.com old username: George Bailey (but now I use my real name) http://www.google.com/images?q=George+Bailey
Updated on July 05, 2022Comments
-
700 Software almost 2 years
Is it possible to have a single line
TextView
that cuts off at the nearest pixel and does not add three dots? -
max4ever about 13 yearsaccording to Eclipse's documentation singleLine is "* Deprecated: This attribute is deprecated and is replaced by the textMultiLine flag in the inputType attribute. Use caution when altering existing layouts, as the default value...." i used it without and works fine on android 2.1 :)
-
Sourabh about 9 years
inputType
onTextView
? Isn't that or EditText? -
Jose Manuel Abarca Rodríguez about 9 yearsDidn't work with me, text still shows ellipsis (left cell pushes right cell to the right so text in right cell shows ellipses).
-
Kai Wang over 8 yearsor android:ellipsize="none" in XML.
-
Kai Wang over 8 yearssetting android:ellipsize="none" in XML is enough.