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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:10:46+00:00 2026-05-24T11:10:46+00:00

I want to show two animation simultaneously programatically not in XML file.It should ROTATE

  • 0

I want to show two animation simultaneously programatically not in XML file.It should ROTATE and TRANSLATE
how can I do that?

Please suggest me some way??????

Here is ma code:>

ImageView snowImg1 = (ImageView) findViewById(R.id.snowimg1);
        snowImg1.setVisibility(0);
        ImageView snowImg2 = (ImageView) findViewById(R.id.snowimg2);
        snowImg2.setVisibility(0);
        ImageView snowImg3 = (ImageView) findViewById(R.id.snowimg3);
        snowImg3.setVisibility(0);
        ImageView snowImg4 = (ImageView) findViewById(R.id.snowimg4);
        snowImg4.setVisibility(0);
        ImageView snowImg6 = (ImageView) findViewById(R.id.snowimg6);
        snowImg6.setVisibility(0);
        ImageView snowImg5 = (ImageView) findViewById(R.id.snowimg5);
        snowImg5.setVisibility(0);

        View snowArray[] = {snowImg1, snowImg2, snowImg3, snowImg4, snowImg5, snowImg6};

        Animation snowMov7 = new RotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f , Animation.RELATIVE_TO_SELF,0.5f );
        snowMov7.setRepeatCount(Animation.INFINITE);
        Animation snowMov1 =  new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.1f, Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov1.setDuration(10000);
        Animation snowMov2 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, 0.4f, Animation.RELATIVE_TO_PARENT, -0.1f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov2.setDuration(10100);
        Animation snowMov3 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.5f, Animation.RELATIVE_TO_PARENT, 0.1f, Animation.RELATIVE_TO_PARENT, -0.1f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov3.setDuration(10200);
        Animation snowMov4 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.7f, Animation.RELATIVE_TO_PARENT, 0.2f, Animation.RELATIVE_TO_PARENT,-0.1f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov4.setDuration(10300);
        Animation snowMov5 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.6f, Animation.RELATIVE_TO_PARENT, 0.7f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov5.setDuration(10400);
        Animation snowMov6 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.9f, Animation.RELATIVE_TO_PARENT, 0.9f, Animation.RELATIVE_TO_PARENT, 0.05f, Animation.RELATIVE_TO_PARENT, 0.9f);
        snowMov6.setDuration(10500);

        Animation movArray[] = {snowMov1,snowMov2, snowMov3, snowMov4, snowMov5, snowMov6,snowMov7};

        for(int i=0;i<6;i++)
        {
            movArray[i].reset();
            movArray[i].setFillAfter(true);
            movArray[i].setAnimationListener(this);
            snowArray[i].startAnimation(movArray[i]);      
            snowArray[i].startAnimation(movArray[6]);
        }   

Can we use startAnimation twice in program???Please help me?

  • 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-24T11:10:47+00:00Added an answer on May 24, 2026 at 11:10 am

    I have done it Using ANIMATIONSET we can do this.

    AnimationSet snowMov1 = new AnimationSet(true);
            RotateAnimation rotate1 = new RotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f , Animation.RELATIVE_TO_SELF,0.5f );
            rotate1.setStartOffset(50);
            rotate1.setDuration(9500);
            snowMov1.addAnimation(rotate1);
            TranslateAnimation trans1 =  new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.1f, Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f);
            trans1.setDuration(12000);
            snowMov1.addAnimation(trans1);
    

    In this way we can made set for multiple animations.

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

Sidebar

Related Questions

We want to show a hint for a JList that the user can select
I want to show that first two citizen are married together in 2009 using
If I want a single page turn animation, not book style with two pages
I want to show two models attributes in Groups view file in zii.widgets.CDetailView. My
I want to show first element that is hidden by jquery. my html code
I want to show a label rotated 90 degrees (so I can put a
I want to create transition animation within a UIView (not from one UIView to
Based on the SELECT CASE below I want to show two separate columns within
I need help with my loop. In each div, I want to show two
I want to show values of two radio buttons in the span tag when

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.