6

I'm not sure, if "running string" the right name.

I try to explain, what I mean.

I have a TextView in my Layout and want to have text there, which runs from rigth to left, again, and again, and again.

I thougt, I just should enable marquee for that, but the text stays instead of running :(

Here is my TextView-Code:

<TextView
 android:id="@+id/text_ticker" 
 android:layout_width="fill_parent" 
 android:layout_height="wrap_content" 
 android:background="@color/grey0" 
 android:textColor="@color/black" 
 android:layout_marginLeft="5dp" 
 android:layout_marginRight="5dp" 
 android:layout_marginTop="5dp" 
 android:padding="10dp" 
 android:ellipsize="marquee"      
 android:marqueeRepeatLimit="marquee_forever"
 android:scrollHorizontally="true">
</TextView>

Thank you,

Mur

3
  • Is the text longer then the screen can show? Otherwise it probably won't scroll. Commented Nov 30, 2010 at 18:09
  • possible duplicate of Is there a way to make ellipsize="marquee" always scroll? Commented Nov 30, 2010 at 18:14
  • Yes, it is ... as I said, I haven't found right word for search. Commented Dec 1, 2010 at 8:23

1 Answer 1

2

Ellipsize marquee scrolling will only scroll when the textView gains focus.

Edit: Here is the solution

Sign up to request clarification or add additional context in comments.

5 Comments

and how to get scrolling without getting focus?
In the topic you've sent me I found also ticker.SetSelected(true), that is much easier than the answer marked as solution :) Thank you
Is there the possibility, to change the way of repeats. Now it's not really fluent at the end of displaying. I've tried also suggestion with animation. The only way now is to add many spaces at the begin and the end of my tickertext
You would have to define a custom animation instead of using marquee if you want to change the way it scrolls.
I would know what else to suggest, try a different animation? I also dont like the way marquee scrolling works honestly. Sorry I couldn't be of more help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.