views:

31

answers:

1

Hi, I have a lsit view and i that i need to add some text. in the adapter, I need to append ... at the end and i used the following when i give

android:ellipsize="end"

in the only shows 2 line eg:
asdnfsdfdsf asdfsdfasdf
sdfsd sdfsdf sdfsd ad...

And when i give

android:ellipsize="start"

it is as :
asdnfsdfdsf asdfsdfasdfd
...sdfsd sdfsdf sdfsd ad

The complete code i used:

<TextView  android:layout_width="wrap_content" android:background="#016A7D"

   android:layout_height="80dp" android:textColor="#000000"

    android:maxLines="4"          

    android:id="@+id/list_report_desciption" 

    android:ellipsize="end"

/> And the output i got is:

What exactly will a smarter planet
look like? How's IT changing? A...

actually it contains more than 6 lines
Is there any thing i need to set so that i need to get 3 lines
Thanks

A: 

Text ellipsization seems buggy, accroding to this report: http://code.google.com/p/android/issues/detail?id=10554

A workaround allows ellipsizing one line of text, by setting the android:singleLine attribute to true. But this attribute is deprecated.

DavLink