Elijah_Steed
Elijah_Steed

Reputation: 55

i need help creating a balloon animation for my app

Well I don't have much android experience let alone android animation and I need to make an animation that makes balloons fly up from the bottom of the screen on the touch of a button. I made the button but idk what I'm doing from this point on. So what I need to know is where I get the images where to put the images and how to make the images move(balloons being the images).

Upvotes: 1

Views: 2333

Answers (1)

Gilad Haimov
Gilad Haimov

Reputation: 5867

You should use TranslationAnimation:

  TranslateAnimation animate;
  animate = new TranslateAnimation(0,0,0, -view.getHeight()); // <------  slide up
  animate.setDuration(200);
  animate.setFillAfter(true);
  balloonView.startAnimation(animate);
  balloonView.setVisibility(View.GONE);

Upvotes: 2

Related Questions