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 7218039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:25:50+00:00 2026-05-28T21:25:50+00:00

If I set a TextView’s ellipsize value to marquee and the marqueeRepeatLimit value to

  • 0

If I set a TextView’s ellipsize value to "marquee" and the marqueeRepeatLimit value to "1" for example (in order to roll a long text across a TextView once), is there any way to detect when the marquee animation has completed?

(Thing is, I have a queue of Strings which is being added to dynamically and I want to pull out and show one of these Strings at a time. A String can be longer than the width of the TextView so I want to roll it across before I show the next one.)

Edit: If it’s not possible to do this by using TextView’s marquee properties, anyone know how can I add an Animation to a TextView which simulates a marquee animation?

  • 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-28T21:25:50+00:00Added an answer on May 28, 2026 at 9:25 pm

    As far as I can tell, it’s not possible to detect when a marquee animation completes and even if I replicated the marquee animation using a translate animation on the TextView, it wouldn’t be straightforward to set the duration of the animation the right length of time according to the text in the TextView. So! What I’m doing now instead is using a TextSwitcher as follows…

    <TextSwitcher
        android:id="@+id/myTextSwitcher"
        ...
        android:inAnimation="@anim/fade_in_slow"
        android:outAnimation="@anim/fade_out_slow" >
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit="marquee_forever"
        android:focusable="true"
        android:focusableInTouchMode="true" />
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit="marquee_forever"
        android:focusable="true"
        android:focusableInTouchMode="true" />
    

    … and calling the myTextSwitcher.setText("text to show next") method every so often using a Timer. Not ideal but the best I could come up with!

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

Sidebar

Related Questions

I have an empty TextView set for my ListView . When there is no
I have a Fragment(A) with a TextView with value XXXX set using setText() method.
I'm trying to set a textview text when the user location changes. All the
My Android app is displaying text in a TextView. Are there any tags or
I set an original TextView value like this: TextView problemName = (TextView) findViewById(R.id.some_variable); But
I want to set a TextView as the value of an integer, hopefully like
I need to set text to textView from thread. All code is created in
if I have set text in textview in such way, which is not problem:
How can I set the text color of a TextView to #bdbdbd programatically?
I met a strange issue, when i set a textview visibility as text.setVisibility(0) ;

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.