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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:20:58+00:00 2026-05-23T05:20:58+00:00

I am relatively new to animation in android and just getting the feel of

  • 0

I am relatively new to animation in android and just getting the feel of a couple of things.I want to know how i can make a “man”(image) run on android.The man is an icon.IF i use animation through the following code the icon just moves across the screen.How do i get the running motion.

       public anima1(Context context) 
{
    super(context);
    cloud=BitmapFactory.decodeResource(getResources(),R.drawable.androidicon);


    // TODO Auto-generated constructor stub
}



       protected  void onDraw(Canvas canvas)
{
    super.onDraw(canvas);

    Rect re=new Rect();
    re.set(0,0,canvas.getWidth(),canvas.getHeight());
    Paint c=new Paint();
    c.setColor(Color.WHITE);
    c.setStyle(Paint.Style.FILL);
    canvas.drawRect(re,c);

    x=x+10;
    if(x==canvas.getWidth())
    {
    y=y+10;
    x=0;
    }
    if(y==canvas.getHeight())
    {
        x=0;
        y=0;
    }
    canvas.drawBitmap(cloud, x, y,p);



     invalidate();



}
  • 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-23T05:20:59+00:00Added an answer on May 23, 2026 at 5:20 am

    To make the man appear to run, you should have several different images of the man with his feet in different positions and swap out the image on every loop. Alternatively, you could use an animated GIF, but I am not sure whether Android will actually play the animation.

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

Sidebar

Related Questions

I am relatively new to Android Animation and Gestures. I have 15 images that
Im relatively new to the Android world but I have a quick question. I
Relatively new to C#; hopefully I'm just overlooking something simple. I have a form
Need to make next animation (on android 2.2 and above): 1.Moving button from top
I want to make the same animation in xml as in code. I code
I'm relatively new to animations so I'm looking for a bit of direction. Let's
Relatively new to JavaScript, so wondering what is the best approach to achive the
Relatively new to rails, I'm working on a simple rails app for a few
Relatively new to WinForms but I'm working on a small business app. Anyway, where
Being relatively new to programming--think Programming in Objective-C by Kochan, Chapter 15--I'm wondering if

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.