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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:37:54+00:00 2026-05-27T22:37:54+00:00

I want to highliht newly-added ListView items with a nice effect. I thought that

  • 0

I want to highliht newly-added ListView items with a nice effect. I thought that was simple&easy, but I stumpled upon a problem:

I want to play TransitionDrawable animation and once it completes – rewind it. The new item is going to be highlited for a moment, and then it will blend with the rest.

TransitionDrawable has methods for playing animation forward and backward, but none that could be used for synchronization. I expected a possibility to specify a callback for animation completion, something like:

 TransitionDrawable transition = (TransitionDrawable) view.getBackground();
 transition.startTransition(500, new TransitionCompleteListener(){
               public void completed()
               { 
                    transition.reverseTransition(500);
               }
       });

But nothing like that is supported by TransitionDrawable class.

The problem is: How to play TransitionDrawable animation, and when it finishes – immediately play it backwards? I had an idea of using Timer class to delay execution of the backwards part of the animation, but this solution looks a bit too heavy for such a simple thing.

Or maybe I should use something different that TransitionDrawable? I’d like to avoid using Property Animations, since I want to support older devices (and PA are avaialble since Honeycomb).

  • 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-27T22:37:55+00:00Added an answer on May 27, 2026 at 10:37 pm

    I haven’t actually tried it myself yet, but I’d say what you’re aiming for might also be possible with an old fashioned View animation, a tween to be precise. In stead of directly manipulating the background drawable (assuming that’s what you’re currently doing), you could potentially create the same effect by changing the alpha property of a View that has exactly the same dimensions as the row layout. You can then specify both the ‘normal’ animation and its reverse in a single AnimationSet and have the latter start with a delay based on the first. Alternatively, Animation provides an AnimationListener you can hook up to and get notified when the first animation ends, and subsequently start its reverse.

    Looking at the source code for TransitionDrawable, I also see some possibilities to extend the current implementation with a custom listener interface. It shouldn’t be too hard to actually realise the pattern you illustrate in the code snippet in your question.

    I’m a bit short on time right now, so shoot me a comment in case you need any more concrete pointers (e.g. code snippets) – I’ll then try to find some time this weekend to help you out.

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

Sidebar

Related Questions

I want to highlight a <span> using jQuery.effect('highlight'), but it fades out after a
I have a table that i want to highlight during onmouseover/onmouseout. I already know
I want to make a uiview that can be aware of highlight status, like
I have two tables and they highlight as expected, but I only want the
I have an items template and I want to highlight some text in a
I have a PHP search script and I want to highlight the keywords that
I've 3 divs that i want to highlight (with a css class) one after
I want to highlight the current menu you have click. I'm using CSS, but
I want to highlight only keywords that look like this: {KEYWORD} (basically UPPERCASE words
I have two simple textareas where in i want to highlight the javascript code

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.