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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:57:56+00:00 2026-06-03T04:57:56+00:00

How do you remove a Bitmap in android? I have created a bitmap that

  • 0

How do you remove a Bitmap in android? I have created a bitmap that is called”sun” but as soon as I have finished a guy walking across the screen I want to add a new bit map called “moon” but it just gets created over top of the sun, how can I remove the sun bitmap? here is my code for the walking guy.

    switch (counter)
    {

    case 0:
        skyRect.set(0, 0, canvas.getWidth(), 400);
        canvas.drawRect(skyRect, sky);
        canvas.drawBitmap(AndroidDude, changingX, (canvas.getHeight()/2 - (AndroidDude.getHeight()/2)), null);
        if (changingX < canvas.getWidth())
        {
            changingX += 10;
        }
        else 
        {
            changingX = 0;
            sunChangingX = 0;
            counter++;
        }

        grassRect.set(0, 400, canvas.getWidth(), canvas.getHeight());
        canvas.drawRect(grassRect, grass);
        canvas.drawBitmap(cloud, 100, 50, null);
        canvas.drawBitmap(cloud, 700, 100, null);
        canvas.drawBitmap(sun, (canvas.getWidth() - sun.getWidth()), 0, null);
        invalidate();
        break;

    case 1:
        //Remove sun and clouds here?
        canvas.drawBitmap(moon, (canvas.getWidth() - moon.getWidth()), 0, null);
        canvas.drawBitmap(AndroidDude, changingX, (canvas.getHeight()/2 - (AndroidDude.getHeight()/2)), null);
        if (changingX < canvas.getWidth())
        {
            changingX += 10;
        }
        else 
        {
            changingX = 0;
            counter++;
        }
        grassRect.set(0, 400, canvas.getWidth(), canvas.getHeight());
        canvas.drawRect(grassRect, grass);
        canvas.drawBitmap(cloud, 100, 50, null);
        canvas.drawBitmap(cloud, 700, 100, null);
        canvas.drawBitmap(sun, sunChangingX, 0, null);
        invalidate();
        break;
    }
  • 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-03T04:57:58+00:00Added an answer on June 3, 2026 at 4:57 am

    Redraw your background (sky and grass) over the bitmap you want removed. Make a refresh function.

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

Sidebar

Related Questions

I am developing an android application in which i have to store a bitmap
How to remove shortcuts in the home screen(programatically). I can remove the shortcuts created
In my class I have created a Bitmap with a corresponding BitmapData object: Class
I have a class called PlayerList, in in that class i have an ArrayList
I have written a small Android project that shows some (image)buttons. It works fine
remove() method without any argument removes all documents inside the collection. $this->db->$collection->remove(); But how
how remove html table rows after 2nd row? if in table have 5 row,
I want to remove digits from a float to have a fixed number of
I tested: rm \-\-remove-files but I am unable to remove it. How can I
I current have some code that takes a screenshot and saves this to the

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.