Search code examples
androidmarquee

Marquee text is no working properly in samsung Galaxy S3


I have done a marquee text. I did this by the following code snippet

    <TextView
        android:id="@+id/scrolltext"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#000"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit="marquee_forever"
        android:padding="5dip"
        android:scrollHorizontally="true"
        android:singleLine="true"
        android:text="@string/scrolltext"
        android:textColor="#F4CE6B" />

Problem is that it is not working properly in some phones like samsung Galaxy s3. The complete text is not displayed. Instead of that only few dotes are there.


Solution

  • Solved the issue.

    I made a mistake in my coding by calling an additional scrolling movement method.

    scroll_text.setText(scroll); 
    scroll_text.setSelected(true);
    scroll_text.setMovementMethod(new ScrollingMovementMethod());
    

    Now it seems to be ok by removing that line of code.

    scroll_text. set Selected(true);
    scroll_text.setText(scroll);