8
나는 안드로이드 3.0에서 일하고있다. 내 레이아웃에 TextView가 있는데 기본 메뉴에서와 같이 8 자 뒤에 색이 바래기를 원합니다. 이 텍스트는 RelativeLayout에 있습니다.안드로이드에서 TextView의 가장자리를 희미하게하는 방법?
<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>
아무도 몇 자 후 텍스트를 페이드하는 방법을 알고 있습니까?
Ellipsize = Marquee 및 singleLine = true를 추가했으며 이제는 작동합니다. 감사 코드 – Yaniv
을 잊지 말고 "titleText.setSelected (true);"코드를 추가하십시오. –