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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:38:15+00:00 2026-06-04T01:38:15+00:00

I have 4 activities A, B, C and D. Activity A has a menu.

  • 0

I have 4 activities A, B, C and D.

Activity A has a menu. One of its options opens Activity D which has a list view.
Activity A opens Activity B by a button. Activity B opens Activity C by a button.

Activity C has 4 ImageViews that I recycle them on finish.

When I do the following scenario every thing is OK:

A -> B –back to–> A –click Menu to go to D –> OK

When I do the following scenario I get this fatal exception:

A -> B -> C –back to–> B –back to–> A –click Menu to go to D –> get exception

There is no relation between Activity D and C. but why I get this exception here????

A->B->C (using buttons)

A-> D (using menu)

05-15 11:33:49.600: E/AndroidRuntime(2722): FATAL EXCEPTION: main
05-15 11:33:49.600: E/AndroidRuntime(2722): java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@41326810
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.graphics.Canvas.throwIfRecycled(Canvas.java:1038)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.graphics.Canvas.drawBitmap(Canvas.java:1142)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:393)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.ImageView.onDraw(ImageView.java:924)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.View.draw(View.java:10983)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.ListView.drawChild(ListView.java:3223)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.AbsListView.dispatchDraw(AbsListView.java:2092)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.ListView.dispatchDraw(ListView.java:3218)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.View.draw(View.java:11088)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.AbsListView.draw(AbsListView.java:3398)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.View.draw(View.java:10986)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.View.draw(View.java:10986)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.widget.FrameLayout.draw(FrameLayout.java:450)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewRootImpl.draw(ViewRootImpl.java:2026)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.os.Looper.loop(Looper.java:137)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at android.app.ActivityThread.main(ActivityThread.java:4424)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at java.lang.reflect.Method.invokeNative(Native Method)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at java.lang.reflect.Method.invoke(Method.java:511)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-15 11:33:49.600: E/AndroidRuntime(2722):     at dalvik.system.NativeStart.main(Native Method)
  • 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-04T01:38:18+00:00Added an answer on June 4, 2026 at 1:38 am

    I noticed I should not use same image resources for different Activities while one of them is recycling its bitmap.

    I was using same image resource (img01.png) for ImageViews in both Activity C and Activity D.

    I changed the image resource of Activity C to img02.png and problem solved.

    But I do not know its logical reason.

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

Sidebar

Related Questions

Assume that we have 3 different activities. Each activity has its own XML file
My app has a few activities, all have an options menu, which is the
In one of my Activities I have a ListView that displays a list of
I have two activities in my app. One is a list that is presented
I have 3 activities. 1st activity has a 'go right' image button. (to move
I have an Android application that contains two Activities . Activity A has a
I have an Activity A which has a "down" button (see image above). When
I have two activities. One activity has the main game and the other activity
I have two activities with navigation menu which has items for launching Activity1 and
I have an application which has 11 different activities. One of these activities is

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.