show lenghty text in TextView

Put your problem here if it does not fit any of the other categories.

show lenghty text in TextView

Postby Zeba Momin » Wed Jan 27, 2010 11:22 am

Hi,
I have a TextView which might contain a text lengthier than its width..in such a case i want to show 3 dots (...) at the end of the text.
How do i do this?
I'm doing panning of the TextView using marquee property

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <TextView android:id="@+id/toptext" android:textColor="@color/white"
  2.  
  3. android:textStyle="bold" android:layout_width="fill_parent"
  4.  
  5. android:layout_height="wrap_content" android:textSize="16px" android:singleLine="true"
  6.  
  7. android:ellipsize="marquee" android:lines="1"
  8.  
  9. android:marqueeRepeatLimit="marquee_forever" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4

Thank you.
Zeba Momin
Developer
Developer
 
Posts: 49
Joined: Thu Sep 17, 2009 6:53 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: TurnitinBot [Bot] and 26 guests