This was asked elsewhere, but the solution did not work for me. So posing it again with more context. The issue is that an activity contains a scrolling music title text view which is disrupted by an updating elapsed time counter text view.
I have these two TextView widgets in my activity layout (although they are encompassed by other layout containers).
<TextView android:id="@+id/v_current_time"
android:minWidth="26dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="right|center_vertical"
android:singleLine="true"
android:textSize="12sp"
android:enabled="false"
/>
<TextView android:id="@+id/v_track_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="normal"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:enabled="true"
/>
The music title is dynamically set to (in the test case) a long line of text. If I never update the text for the current time with the following line, the music title will happily scroll forever no matter how I interact with my pause and play buttons.
tvCurrentTime.setText(DataFormat.formatTime(progress));
But if I do set the text for the current time, the music title will stop. Pressing my pause button somehow kicks scrolling back into gear, but pressing play will cause the current time to update and stop it again.
Per the suggestion in this thread, I attempted to couple the setting of the time text with re-enabling of the scrolling title as follows:
tvCurrentTime.setText(DataFormat.formatTime(progress));
tvTitle.setEnabled(true);
This has no effect on the failure other than to reset the scroller each time it restarts.
Is there some detail that I am missing, or any other thoughts as to what could be going wrong? Thanks a lot!