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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:10:43+00:00 2026-05-22T03:10:43+00:00

Hello I am trying to create an animation like creating heart like bubbles but

  • 0

Hello I am trying to create an animation like enter image description here creating heart like bubbles but not 100% like this. This could on some static Activity.

But I am at no where. Documentation lacks examples and examples in API are just unacceptable. It shouldn’t be so hard to make such animation.

I am pasting my code please help me.

Class File

import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class AnimationTest extends Activity {
AnimationDrawable animation;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Button btnStart = (Button) findViewById(R.id.btnStart);
    final ImageView imgView = (ImageView) findViewById(R.id.img);

    btnStart.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            startAnimation();
        }
    });
    imgView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });
}

class Starter implements Runnable {
    public void run() {
        animation.start();
    }
}

private void startAnimation() {
    animation = new AnimationDrawable();
    animation.addFrame(getResources().getDrawable(R.drawable.one), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.two), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.three), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.four), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.five), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.six), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.seven), 100);
    animation.addFrame(getResources().getDrawable(R.drawable.eight), 100);
    animation.setOneShot(false);


    ImageView imageView = (ImageView) findViewById(R.id.img);
    RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(80, 90);
    params.alignWithParent = true;
    params.addRule(RelativeLayout.CENTER_IN_PARENT);
    imageView.setLayoutParams(params);
    imageView.setImageDrawable(animation);
    imageView.post(new Starter());
}

}

XML File

    <TextView android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:text="Frame by Frame Animation Example"
        android:gravity="center" />

    <RelativeLayout android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:layout_gravity="center_horizontal">

        <ImageView android:id="@+id/img" android:layout_width="80px"
            android:layout_height="90px" android:layout_centerInParent="true" />

        <Button android:id="@+id/btnStart" android:text="Start Animation"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignParentRight="true" />

    </RelativeLayout>

</LinearLayout>

Images, you can past some other images too
124

EDIT
What I want to accomplish
step1: a fish comes from left side
setp2: a fish comes from right side

step3: a heart appears and grows bigger in very center of both fish
step4: then small hearts fly away and disappear

  • 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-22T03:10:44+00:00Added an answer on May 22, 2026 at 3:10 am

    Grow animations

    Translate + scale + rotate animation set

    Start by looking at those. That will teach the basics of Animation API. In order to get the the one after another chain effect you are looking for the only way I’ve found to do it is using animationListener to get a call back when one ends and then start the next one from there. Honestly it may easier to implement for your needs if you just make this into a movie file and play it in a VideoView rather than creating all of those views seperately and applying Animations to all of them.

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

Sidebar

Related Questions

Hello I am trying to create some simple pagination, but my php skills are
Hello I am trying to create a custom expandable listview, but the documentation on
hello i am trying a sqlite database tutorial to build, but its not working
**Hello, I'm trying to create an archiver in java. This means that I am
hello everyone im trying to create this tweak that copies a file from one
Hello I am trying to create a brush but I am having problem with
I'm trying to create a very simple Hello, world program in RoR, but when
Hello i am trying to create aplication witch shows me sms in ListView but
I am trying create alert dailog using glade,but its not working .am i doing
hello i am trying to create a tree like menu (kind of like 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.