trying to use a recycled bitmap android.graphics.Bitmap
<p>I am displaying one .gif in my <code>activity A</code>. When user presses one button user moves to <code>activity b</code> and same .gif is displaying there but I am getting "trying to use a recycled bitmap <code>android.graphics.Bitmap</code>" this error on my <code>activity b</code>.</p>

<p>I am displaying .gif from sd card and on <code>onStop()</code> I am setting <code>imageview</code> of <code>activity a</code> to <code>null</code> as well in <code>activity A</code> but I am not able to solve this issue.</p>

<p>Please help in this case.</p>

<p>//Log Cat</p>

<pre><code>12-31 10:58:49.819: E/AndroidRuntime(20903): java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@405131c8
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.graphics.Canvas.throwIfRecycled(Canvas.java:955)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.graphics.Canvas.drawBitmap(Canvas.java:1044)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:325)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.widget.ImageView.onDraw(ImageView.java:854)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.View.draw(View.java:6880)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.View.draw(View.java:6883)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.View.draw(View.java:6883)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.widget.FrameLayout.draw(FrameLayout.java:357)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.View.draw(View.java:6883)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.widget.FrameLayout.draw(FrameLayout.java:357)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1871)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewRoot.draw(ViewRoot.java:1542)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1269)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1883)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.os.Looper.loop(Looper.java:130)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at android.app.ActivityThread.main(ActivityThread.java:3737)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at java.lang.reflect.Method.invokeNative(Native Method)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at java.lang.reflect.Method.invoke(Method.java:507)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:894)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
12-31 10:58:49.819: E/AndroidRuntime(20903):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
