title: Why I get Canvas: trying to use a recycled bitmap android.graphics?
body: <p>I have 4 activities A, B, C and D.</p>
  
  <p>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. </p>
  
  <p>Activity C has 4 ImageViews that I recycle them on finish.</p>
  
  <p>When I do the following scenario every thing is OK:</p>
  
  <p>A -> B --back to--> A --click Menu to go to D --> <strong>OK</strong></p>
  
  <p>When I do the following scenario I get this fatal exception:</p>
  
  <p>A -> B -> C –back to--> B --back to--> A --click Menu to go to D --> <strong>get exception</strong></p>
  
  <p>There is no relation between Activity D and C. but why I get this exception here????</p>
  
  <pre><code>A-&gt;B-&gt;C (using buttons)
  
  A-&gt; D (using menu)
  </code></pre>
  
  <hr>
  
  <pre><code>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)
  </code></pre>