【问题标题】:How to animate the textview (very very long text )scroll automatically horizontally in recyclerView如何在recyclerView中自动水平滚动textview(非常长的文本)
【发布时间】:2019-03-27 08:33:47
【问题描述】:

根据answer,我让我的 textView 水平滚动长文本,但是在滚动 RecyclerView 后,我的 textview 文本的滚动动画停止了。

我在 recyclerView 的自定义布局中使用的 textView:

            <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" />

【问题讨论】:

标签: java android xml android-layout


【解决方案1】:

您可以在 recyclerview 中使用 Marquee 文本!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-25
    • 1970-01-01
    • 1970-01-01
    • 2021-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多