3

I have created Textview with marquee by using below code.But some space between the marquee text and starting position.How to resolve that ?

<TextView 
  android:id="@+id/capture_mode"
  android:layout_width="200px"
  android:layout_height="wrap_content"           
  android:text="This is a test of marquee on the text view in android."
  android:ellipsize="marquee"
  android:scrollHorizontally="true"
  android:singleLine="true"
  android:focusable="true"
  android:focusableInTouchMode="true"
  android:marqueeRepeatLimit="marquee_forever"
  />

Screen is below.

enter image description here

Note: I need to add two textview with marquee.But first one is only scrolling, another one is idle.How to add two textview with marquee.

  • What exactly is the problem? What does your TextView look like? What do you want it to look like? – GareginSargsyan Dec 25 '13 at 13:56
  • including a screen shot will be better to understand – Nizam Dec 25 '13 at 14:33
  • I have added screen.Check it. My exact problem is when marquee text is comes to end some space between end text and starting text.I don't want to show the space there,this is the issue –  Dec 26 '13 at 04:48
  • Take a look at my answer on this similar question... https://stackoverflow.com/a/72749204/6754511 – Stephen Ruda Jun 24 '22 at 20:43

1 Answers1

0

Try this un your textview:

android:gravity="left"

Phil
  • 4,730
  • 1
  • 41
  • 39