8
Tôi đang làm việc trên Android 3.0. Tôi có một TextView trên bố cục của mình và tôi muốn nó bị mờ sau 8 ký tự như trong menu chính. Văn bản này nằm trong RelativeLayout.Làm thế nào để làm mờ cạnh TextView trong Android?
<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>
Có ai có ý tưởng làm mờ văn bản sau vài ký tự không?
Tôi đã thêm Ellipsize = Marquee và singleLine = true và giờ nó hoạt động. Cảm ơn – Yaniv
và đừng quên thêm mã "titleText.setSelected (true);" –