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

  • Home
  • SEARCH
  • 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 7919117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:45:15+00:00 2026-06-03T15:45:15+00:00

I would like to make a simple animation. My logo is divided in 4

  • 0

I would like to make a simple animation. My logo is divided in 4 parts :

1|2

3|4

I would like to fadein-out each part, but only one after the other : 1 -> 2 -> 4 -> 3 -> 1…
I have no problem with this, but sometimes my animation is not synchronized and the 4 parts animate simultaneously :

final ImageView logo1 = (ImageView) v.findViewById(R.id.logo1);
    logo1.clearAnimation();
    final ImageView logo2 = (ImageView) v.findViewById(R.id.logo2);
    logo2.clearAnimation();
    final ImageView logo3 = (ImageView) v.findViewById(R.id.logo3);
    logo3.clearAnimation();
    final ImageView logo4 = (ImageView) v.findViewById(R.id.logo4);
    logo4.clearAnimation();

    final Animation anim1 = AnimationUtils.loadAnimation(c, R.anim.animlogo);
    anim1.setFillAfter(true);
    anim1.setStartOffset(0);
    final Animation anim2 = AnimationUtils.loadAnimation(c, R.anim.animlogo);
    anim2.setStartOffset(anim1.getDuration());
    anim2.setFillAfter(true);
    final Animation anim3 = AnimationUtils.loadAnimation(c, R.anim.animlogo);
    anim3.setStartOffset(anim1.getDuration()+anim2.getDuration());
    anim3.setFillAfter(true);
    final Animation anim4 = AnimationUtils.loadAnimation(c, R.anim.animlogo);
    anim4.setStartOffset(anim1.getDuration()+anim2.getDuration()+anim3.getDuration());
    anim4.setFillAfter(true);

    anim1.setAnimationListener(new AnimationListener() {

        @Override
        public void onAnimationStart(Animation animation) {}

        @Override
        public void onAnimationRepeat(Animation animation) {}

        @Override
        public void onAnimationEnd(Animation animation) {
            anim1.setStartOffset(anim2.getDuration()+anim4.getDuration()+anim3.getDuration());
            logo1.startAnimation(anim1);
        }
    });

    anim2.setAnimationListener(new AnimationListener() {

        @Override
        public void onAnimationStart(Animation animation) {}

        @Override
        public void onAnimationRepeat(Animation animation) {}

        @Override
        public void onAnimationEnd(Animation animation) {
            anim2.setStartOffset(anim1.getDuration()+anim4.getDuration()+anim3.getDuration());
            logo2.startAnimation(anim2);
        }
    });

    anim3.setAnimationListener(new AnimationListener() {

        @Override
        public void onAnimationStart(Animation animation) {}

        @Override
        public void onAnimationRepeat(Animation animation) {}

        @Override
        public void onAnimationEnd(Animation animation) {
            anim3.setStartOffset(anim2.getDuration()+anim4.getDuration()+anim1.getDuration());
            logo4.startAnimation(anim3);
        }
    });

    anim4.setAnimationListener(new AnimationListener() {

        @Override
        public void onAnimationStart(Animation animation) {}

        @Override
        public void onAnimationRepeat(Animation animation) {}

        @Override
        public void onAnimationEnd(Animation animation) {
            anim4.setStartOffset(anim2.getDuration()+anim1.getDuration()+anim3.getDuration());
            logo3.startAnimation(anim4);
        }
    });
    
    logo1.startAnimation(anim1);
    logo2.startAnimation(anim2);
    logo4.startAnimation(anim3);
    logo3.startAnimation(anim4);
    
    anim1.startNow();anim2.startNow();anim3.startNow();anim4.startNow();

Any idea ?

  • 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-03T15:45:17+00:00Added an answer on June 3, 2026 at 3:45 pm

    Start only anim1:

    logo1.startAnimation(anim1);
    

    and in anim1’s AnimationListener’s onAnimationEnd do:

    logo2.startAnimation(anim2);
    

    This way anim2 won’t start before anim1 is finished.

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

Sidebar

Related Questions

I would like to make a simple but non trivial manipulation of DOM Elements
i would like make a simple script that store one dynamic image (Random) in
I have some data in .cvs. I would like to make a simple barplot
I would like to make a ListBox function like a Grid . Each time
I would like to perform a simple animation on a series of UIImageViews in
I would like to make a simple collapsible faq in wordpress. There are accordion
I would like to make a simple panel with buttons that are placed horizontally
I would like to make a simple windows installer to copy some files into
I would like to make a simple plan: I did something like this: CREATE
I would like to make a simple web app that displays 20 or so

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.