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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:58:24+00:00 2026-06-18T05:58:24+00:00

I am having issues implementing an AnimationDrawable in my application. I referenced the developer

  • 0

I am having issues implementing an AnimationDrawable in my application. I referenced the developer guide to implement the animation. For whatever reason, after the animation plays, the first and last frame remain visible on the screen.

My xml file looks like this:

<animation-list android:id="@+id/selected" 
android:oneshot="true" xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/bubbles_1hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_2hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_3hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_4hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_5hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_6hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_7hd" android:duration="50" />
<item android:drawable="@drawable/bubbles_8hd" android:duration="50" />

and my code looks like this:

    ImageView img = (ImageView)findViewById(R.id.imageAnimation);
    img.setBackgroundResource(R.drawable.bubble_animation); 
    AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();
    frameAnimation.setOneShot(true);
    frameAnimation.start();

The only solution I have been able to figure out. Would be to implement a delayed timer set for the end of the animation that hides the ImageView. However I was hoping that there is a simpler more elegant solution that I am missing.

Thanks for your help

  • 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-06-18T05:58:26+00:00Added an answer on June 18, 2026 at 5:58 am

    The solution that I found for this is to insert a transparent image for the first and last slide of the drawable. Not sure if this is the best approach but it works.

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

Sidebar

Related Questions

I'm creating a shopping cart application and I'm having some issues with implementing a
I am having some issues implementing RestKit/CoreData with my application. Using the RKTwitterCoreData example
I'm having some issues implementing a TimePicker in my application that allows the user
I'm having an issue implementing an excel feature I'm after, this is my data
HI, I am new to JQuery. I am having issues implementing the same. I
I'm having some issues with implementing a logarithm class with operator overloading in C++.
I'm having issues here implementing the SimpleModal ( http://www.ericmmartin.com/projects/simplemodal/ ) version of a modal
Problem, I want to use sessions, but I am having issues with implementing sessions
I was having some issues the other day with my interface lagging and after
I'm implementing the Viola Jones algorithm for face detection. I'm having issues with the

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.