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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:34:53+00:00 2026-06-06T05:34:53+00:00

I am working on game application and i use AnimationDrawable for image change. but

  • 0

I am working on game application and i use AnimationDrawable for image change.
but problem is i want imageview invisible when Animation is finish.so what should i do
for this.

My code is like this...

 mAnimation = new AnimationDrawable();
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d5),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d4),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d3),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d2),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d1),150);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d2),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d3),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d4),50);
         mAnimation.addFrame(getResources().getDrawable(R.drawable.d5),50);
       mAnimation.addFrame(getResources().getDrawable(R.drawable.new_transparent),50);


         mAnimation.setOneShot(true);
         mDogImage.setImageDrawable(mAnimation);

Thanks in advance.

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

    There is no event or listener that will notify you.You just need to apply the trick

    Use mAnimation.getNumberOfFrames(); to get total number of frames and since each frame will last long for 50ms.So your animation is supposed to end in mAnimation.getNumberOfFrames() * 50 ms.

    For eg if you have 9 frames and each frame has duration of 50ms then your animation is going to end in 450ms.

    So conclusion will be you will make your ImageView invisible after 450ms once animation starts.

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

Sidebar

Related Questions

I am working on a Flex application/game where a lot of UIComponents are moved
I'm working on a game where multiple players should be able to play at
I'm working on multiplayer game on w7. I use UdpAnySourceMulticastChannel class from RockPaperScissor example
I'm working up a game in XCode, and I want to add a helper
I'm working on modifying Firaxis' Civilization 4 core game DLL. The host application is
I want to use Haskell in production. It has a lot of libraties but
I'm working on a C# Server application for a game engine I'm writing in
currently i am working in game application, Already i have one viewcontroller (and make
I know how to import and use read/writeprocessmomory in C#. I'm working on game
I am working on a facebook application a game and was wondering how 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.