Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6156887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:41:24+00:00 2026-05-23T20:41:24+00:00

The marquee animation does not work, this is what I did. <LinearLayout android:layout_height=wrap_content android:layout_width=wrap_content

  • 0

The marquee animation does not work, this is what I did.

<LinearLayout android:layout_height="wrap_content"
            android:layout_width="wrap_content" android:background="@drawable/bg_trans"
            android:layout_alignParentBottom="true" android:orientation="vertical">

            <TextView android:id="@+id/trackName"
            android:layout_height="wrap_content" android:layout_width="wrap_content"                
            android:textColor="@android:color/white" android:textSize="18sp"
            android:maxLines="2" android:ellipsize="marquee"
            android:scrollHorizontally="true" 
            android:focusable="true" android:focusableInTouchMode="true"
            android:marqueeRepeatLimit="marquee_forever"
            android:layout_gravity="center_horizontal" />

            <TextView android:id="@+id/artistName" 
            android:layout_height="wrap_content" android:layout_width="wrap_content"                
            android:textColor="@android:color/white" android:textSize="18sp"
            android:maxLines="2" android:ellipsize="marquee"
            android:scrollHorizontally="true" 
            android:focusable="true" android:focusableInTouchMode="true"
            android:marqueeRepeatLimit="marquee_forever"
            android:layout_gravity="center_horizontal" />
            </LinearLayout>

It works for the first textview but doens’t work for the second. What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:41:24+00:00Added an answer on May 23, 2026 at 8:41 pm

    This works for me –

    <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"
    />
    

    The field marqueeRepeatLimit will set the number of repitions.

    UPDATE: The width of the text view need to be hardcoded to a specific value, you can set it to wrap_content. In such cases the marquee will still work just that it will have some blank space after the end the text and before it starts to display the text again. (Think Digital signboards, they have some gap in the display before displaying the next item.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to build a marquee control with smooth text animation. Current efforts include: Using
How to add marquee behaviour to text of JLabel ? I have tried this
How can I use marquee text in an android application?
I have setup a jquery based marquee, This works perfectly fine until I have
I am writing a marquee script because I do not like the fact that
I need to create Marquee in Android using only java code without using xml?
I want to get contain from marquee tag in some page. This is my
I have a ProgressBar that uses the marquee style when a report is being
I have a jQuery animation that animates the 'scrollLeft' on a container to produce
My text animation scrolls from left to right, which is OK. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.