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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:44:30+00:00 2026-06-11T18:44:30+00:00

I am doing a frame to frame animation. My problem is I have given

  • 0

I am doing a frame to frame animation. My problem is I have given around 10 drawable images in my anim xml. But only first two and last two is showing not all the images. I am doing a translation also on this image.After translation only frame animation starts.Translation is happening and frame animation also happening but it is not showing all the frames. Here is my anim xml. only frog_01 and frog_02 is showing.

<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true" >

<item
    android:drawable="@drawable/frog_01"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_02"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_03"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_04"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_05"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_04"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_03"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_02"
    android:duration="70"/>
<item
    android:drawable="@drawable/frog_01"
    android:duration="70"/>

</animation-list>

Here is the code which I am using for the translation and Frame animation…

public void frogAnim() {

    frogView.clearAnimation();
    final TranslateAnimation fslide2 = new TranslateAnimation(10, 65, 0, 0);
    fslide2.setDuration(400);
    fslide2.setFillAfter(true);
    fslide2.setAnimationListener(fanimationListener1);
    frogView.startAnimation(fslide2);
    c = false;
}


AnimationListener fanimationListener1 = new AnimationListener() {

    public void onAnimationEnd(Animation arg0) {
        c = true;

        frogView.setBackgroundResource(R.drawable.frog_movement);
        frogFrameAnimation = (AnimationDrawable) frogView.getBackground();
        frogFrameAnimation.start();
        playAudioFileListener(R.raw.frog, player);



        CountDownTimer count = new CountDownTimer(200, 700) {

            @Override
            public void onTick(long millisUntilFinished) {

            }

            @Override
            public void onFinish() {
                frogFrameAnimation.stop();
                titileAnimMusic(R.drawable.frog_title,
                        R.anim.alpha_fade_in1, R.raw.vo_child_frog, player);

            }
        };
        count.start();
    }

    public void onAnimationRepeat(Animation animation) {
        // TODO Auto-generated method stub
    }

    public void onAnimationStart(Animation animation) {
    }
};
  • 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-11T18:44:31+00:00Added an answer on June 11, 2026 at 6:44 pm

    Try this too…..

        img=(ImageView) findViewById(R.id.imageView1);
        img.setBackgroundResource(R.layout.animation);
    
        Animation animation =AnimationUtils.loadAnimation(this,R.anim.translate);
        img.startAnimation(animation);//calling translate animation
    
        CallDelay(1000);
    
    public void CallDelay(long time)
    {
            Handler handler = new Handler(); 
            handler.postDelayed(new Runnable()
            {           
                public void run() 
                { 
    
                    myanimation();    
                }
            },  time); 
     }
    
    
    public void myanimation()
    {
      //calling frame animation
        AnimationDrawable anim=(AnimationDrawable) img.getBackground();
        anim.start();
    }
    

    Try like this calling with a delay after one animation..

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

Sidebar

Related Questions

I am doing some exercises with delegate, but now I have a problem with
Doing some jquery animation. I have certain divs set up with an attribute of
I'm doing an animation using javascript: function animate(){ window.setTimeout(function(){ //Do a new frame and
I am drawing a frame by frame animation to a canvas and I have
I have an animation (currently 30 different images repeating) and I wish to add
I am doing Video decoding (mpeg2, frame size 360x240) on Android phone with ARM-Cortex
Doing my first SL4 MVVM RIA based application and i ran into the following
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
Doing my first tryouts with foreign keys in a mySQL database and are trying
I am using this code to flip my view. but the problem is 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.