Q
Q
qqweer2020-10-18 12:16:37
Android
qqweer, 2020-10-18 12:16:37

How to make running text in TextView?

How to make it scroll further when the text does not fit in the text view cavity.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
qqweer, 2020-10-18
@hawkkiller

Solution:
add to xml file

<TextView
            <!--
            android:id="@+id/this_song_title"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:textColor="@color/rose"
            android:textSize="18dp"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:gravity="center"
            android:fontFamily="@font/comfortaa"
            !-->


            android:ellipsize="marquee"
            android:singleLine="true"
            android:marqueeRepeatLimit="marquee_forever"/>

also, add to activity
this_song_title.isSelected = true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question