Is it possible to have a single line TextView
that cuts off at the nearest pixel and does not add three dots?
Asked
Active
Viewed 2.9k times
12

Seraphim's
- 12,559
- 20
- 88
- 129

700 Software
- 85,281
- 83
- 234
- 341
-
You got any solution for this? – Geethu Nov 11 '15 at 06:32
2 Answers
27
<TextView
android:id="@+id/text_ivew"
style="@style/Text.Title"
singleLine="false"
android:ellipsize="end"
android:lines="1"
android:text="text"></TextView>
-
2according 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 :) – max4ever May 31 '11 at 14:27
-
-
Didn't work with me, text still shows ellipsis (left cell pushes right cell to the right so text in right cell shows ellipses). – Jose Manuel Abarca Rodríguez Apr 27 '15 at 18:44
-
5
You should just be able to set the android:ellipsize property to false on your TextView in xml.

bran.strat
- 51
- 2