1

I have reffered to this on making my textview scrollable but it does not seem to work for me. What am I doing wrong? My textView is part of a RemoteView, if it matters at all...

code

<TextView
            android:ellipsize="marquee"
            android:scrollHorizontally="true"
            android:textColor="@color/black"
            android:layout_gravity="left"
            android:id="@+id/status_bar_track_name"
            android:focusable="true"
            android:fadingEdge="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            />
Community
  • 1
  • 1
bob dylan
  • 647
  • 1
  • 10
  • 25
  • 1
    Possible duplicate of [Get TextView from RemoteViews to make its text scrollable](https://stackoverflow.com/questions/25415828/get-textview-from-remoteviews-to-make-its-text-scrollable) – Luca Ziegler Dec 21 '17 at 12:51

1 Answers1

0

Change your TextView to:

<TextView
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:maxLines="1"
  android:duplicateParentState="true"
  android:ellipsize="marquee"
  android:marqueeRepeatLimit="marquee_forever"
  android:fadingEdge="horizontal"
  android:focusable="true"
  android:focusableInTouchMode="true"
  android:freezesText="true"
  android:scrollHorizontally="false"
  android:singleLine="true"
  >
        <requestFocus android:duplicateParentState="true"
             android:focusable="true"
             android:focusableInTouchMode="true" />
  </TextView>
Luca Ziegler
  • 3,236
  • 1
  • 22
  • 39