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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:57:07+00:00 2026-05-25T02:57:07+00:00

I have developed an app which has Frame by Frame animation. I am getting

  • 0

I have developed an app which has Frame by Frame animation. I am getting resources from drawable folder. So the size of my apk is huge. Now I would like to get resources from server, but I am unable to come up with an idea to do this.
i have put my code over here

main.xml ::

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView android:id="@+id/simple_anim"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerHorizontal="true"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, XMLAnimation"
/>
<Button android:text="Button" 
android:id="@+id/button1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"></Button>
</LinearLayout> 

frame_animation_girl.xml ::

<animation-list xmlns:android=
 "http://schemas.android.com/apk/res/android"
android:oneshot="false">
       <item android:drawable="@drawable/girl0001" android:duration="20" />
       <item android:drawable="@drawable/girl0002" android:duration="20" />
       <item android:drawable="@drawable/girl0003" android:duration="20" />
       <item android:drawable="@drawable/girl0004" android:duration="20" />
       <item android:drawable="@drawable/girl0005" android:duration="20" />
       <item android:drawable="@drawable/girl0006" android:duration="20" />
  </animation-list>

Java file ::

        ImageView img = (ImageView) findViewById(R.id.simple_anim);
        img.setBackgroundResource(R.drawable.frame_animation_girl);

        MyAnimationRoutine mar = new MyAnimationRoutine();
        MyAnimationRoutine2 mar2 = new MyAnimationRoutine2();

        Timer t = new Timer(false);
        t.schedule(mar, 100);
        Timer t2 = new Timer(false);
        t2.schedule(mar2, 5000);
        Buttona = (Button) findViewById(R.id.button1);
        final Intent animationIntent = new Intent(this, TranningIntent.class);
        Buttona.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {

                startActivity(animationIntent);
                finish();
            }
        });
    }

    class MyAnimationRoutine extends TimerTask {
        MyAnimationRoutine() {
        }

        public void run() {
            ImageView img = (ImageView) findViewById(R.id.simple_anim);
            // Get the background, which has been compiled to an
            // AnimationDrawable object.
            AnimationDrawable frameAnimation = (AnimationDrawable) img
                    .getBackground();

            // Start the animation (looped playback by default).
            frameAnimation.start();
        }
    }

    class MyAnimationRoutine2 extends TimerTask {
        MyAnimationRoutine2() {
        }

        public void run() {
            ImageView img = (ImageView) findViewById(R.id.simple_anim);
            // Get the background, which has been compiled to an
            // AnimationDrawable object.
            AnimationDrawable frameAnimation = (AnimationDrawable) img
                    .getBackground();

            // stop the animation (looped playback by default).
            /* frameAnimation.stop(); */
        }
    }
}
  • 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-25T02:57:08+00:00Added an answer on May 25, 2026 at 2:57 am

    I think this really depends on what you’re trying to do, and what your animations are. Some simpler animations (e.g. rotations) you could get away with animating a single drawable, potentially allowing you to store fewer assets. If you are dealing with really complex animations and potentially many assets, you could always return data from your server that can be interpreted by your client logic into animations programmatically (not via xml).

    There is also some discussion of using XML files at runtime in this thread:
    Download and replace Android resource files

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

Sidebar

Related Questions

I have developed an app which requests permission from the user to access their
I have musical app developed for OS X, which has following features, Play multiple
I have developed an application which has the functionality of receiving notifications from server.
I have a Win32 app developed in C++ Builder XE, which has worked great
I have current a developed app which I am going to submit in just
I have developed an app that has work successfully for the last 4 months
I have developed a Cocos2d-X app with XCode which works perfectly when I launch
I have developed an app which uses my own custom keyboard (well, a view
I have developed a grails/groovy application for a legacy database which has user maintenance
I have an application written in platform-independent C++ which has been primarily developed on

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.