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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:02:03+00:00 2026-05-26T23:02:03+00:00

I created an animation that simulates an explosion: a booom image with this animation:

  • 0

I created an animation that simulates an explosion: a “booom” image with this animation:

explosion.xml HyperspaceExplosion on Activity

<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">


<scale
    android:interpolator="@android:anim/bounce_interpolator"
    android:fromXScale="1.0"
    android:toXScale="2.0"
    android:fromYScale="1.0"
    android:toYScale="2.5"
    android:pivotX="50%"
    android:pivotY="50%"
    android:fillAfter="false"
    android:fillBefore="false"
    android:duration="3000"
     />
</set>

when a player clicks on the bomb explosion begins.
At the end of explosion I want open a Dialog.

the simple code for bomb behaviour:

getBombImage().setOnClickListener(
            new View.OnClickListener() {

                MediaPlayer mp = null;

                    @Override
                    public void onClick(View v) {


                             getExplosionImage().setVisibility(View.VISIBLE);

                        if(!isSoundOff()){
                            mp = MediaPlayer.create(getApplicationContext(), R.raw.explosion);
                            mp.start();
                        }

                        getExplosionImage().startAnimation(getHyperspaceExplosion());
                        getExplosionImage().setVisibility(View.INVISIBLE);

                        showDialog(1);

                    }
                }
);

The problem is that the explosion and the dialog are in conflict in terms of time and the explosion continues after the dialog is open.

I want sincronize two events: before the explosion. At the end of explosion, I want open the dialog.

Anybody ca help me?

Thanks in advice.

  • 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-26T23:02:04+00:00Added an answer on May 26, 2026 at 11:02 pm

    Use an AnimationListener and open your dialog inside onAnimationEnd().

    For example like this:

    Animation a = getHyperspaceExplosion();
    a.setAnimationListener(new AnimationListener() {
        public void onAnimationEnd(Animation animation) {
            showDialog(1);
        }
    
        // ..other listener methods here..
    });
    getExplosionImage().startAnimation(a);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had created a Transform animation in android using xml.I am running it on
I have created a jQuery animation that can be seen by clicking the Preview
I have this code which should create a splash image with either no animation
So I have created a CSS3 animation that does not behave consistently across the
I have just created a simple animation. Lets say that in one frame I
while im working on simple animation like text rolling.. in that i created external
I created an animation storyboard in xaml file. That story board begins on Button.Click.
I'd like to create an animation of an image that makes the image swing
I created an iPhone PDF viewer using Quartz that also has a page-flip animation.
So I have an animation that is being created by having a bunch of

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.