A.Najafi
A.Najafi

Reputation: 691

How to animate the textview (very very long text )scroll automatically horizontally in recyclerView

According to this answer I made my textView to scroll horizontally for long texts,but after scrolling the RecyclerView,the scrolling animation of my textview's text gets stop.

The textView that I used in my custom layout for recyclerView:

            <TextView
                android:id="@+id/txt_name_job"
                android:layout_width="200dp"
                android:layout_height="wrap_content"
                android:layout_margin="4dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:ellipsize="marquee"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:marqueeRepeatLimit="marquee_forever"
                android:paddingStart="4dp"
                android:scrollHorizontally="true"
                android:singleLine="true"
                android:text="PeakyBlinders"
                android:textSize="19dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

Upvotes: 0

Views: 173

Answers (1)

Matin Zadeh Dolatabad
Matin Zadeh Dolatabad

Reputation: 1017

You may use Marquee text inside recyclerview!

Upvotes: 1

Related Questions