1

I want to format my text for shortcuts as same as shortcut texts in application launcher. Too long text will be cut and its tail will be faded away. Is there anybody know how to do that?

enter image description here

Thanks so much!

Nguyen
  • 2,019
  • 1
  • 24
  • 31

1 Answers1

1

Add fadingEdge to your TextView definition

android:fadingEdge="horizontal"

However this method is deprecated for performance degradation issues and should be used only when required by the application's visual design.

To request fading edges with API level 14 and above, use the

android:requiresFadingEdge attribute

See the documentation

Renjith
  • 5,783
  • 9
  • 31
  • 42
  • Thanks for your tip. However, it doesn't work at my side. I found that fadingEdge does not work in ICS anymore http://stackoverflow.com/questions/11816849/android-ics-fading-edges-dont-work – Nguyen Dec 05 '12 at 04:26
  • ya it is ignored from `Android 4.x`. From `4.x` onwards you have to use `android:requiresFadingEdge` attribute. – Renjith Dec 05 '12 at 04:36
  • requiresFadingEdge also doesn't work. Does it work at your side? – Nguyen Dec 05 '12 at 05:36