How to fade edge of TextView in Android?

Viewed 9998

I am working on Android 3.0. I have a TextView on my layout and I want it to be faded after 8 characters like in the main menu. This Text is located in RelativeLayout.

<TextView android:layout_width="wrap_content"   
android:layout_height="wrap_content"        
android:id="@+id/item_name"         
android:textStyle="bold"        
android:textColor="@color/white"        
android:maxWidth="50dp"         
android:maxLength="8"       
android:layout_below="@+id/item_frame"  
android:layout_alignBottom="@+id/item_view"         
android:layout_centerHorizontal="true" 
android:fadingEdge="horizontal"> 
</TextView>

Does anyone has an idea how to fade the text after few characters?

1 Answers
Related