android-sliding-layer-lib icon indicating copy to clipboard operation
android-sliding-layer-lib copied to clipboard

Canvas: trying to use a recycled bitmap android.graphics.Bitmap

Open rasmikantaguru opened this issue 10 years ago • 12 comments

Hi,

I am getting the below error.I am not able to solve it. Can anyone help me.

java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap

rasmikantaguru avatar Aug 07 '13 12:08 rasmikantaguru

Met the same issue.

alximik00 avatar Oct 14 '13 11:10 alximik00

Same issue here! But only in a virtual device with relatively low RAM! Maybe this really is a bug in this lib, cause it happens exactly when opening a slider - AND look at this: http://stackoverflow.com/a/17635220/273456 I guess within the sliding layer lib, they do a lot of actions like this as well! Could anybody please help??

Zordid avatar Jan 31 '14 08:01 Zordid

One more thing to note: turning hardware acceleration off is the key! Only with hardware acceleration, the sliding lib works. Turn it off and even on my real device I get the same exception!

Zordid avatar Jan 31 '14 09:01 Zordid

I have the same issue

shijilsmb avatar Jan 13 '15 17:01 shijilsmb

I have the same issue Too

mhemdan avatar Jul 09 '15 23:07 mhemdan

Alright, so with HW accel it works for all? Let's gather information about the versions where this is happening so that we can focus our tests on those and propose an alternate solution. There are many variances on how the OS enabled/disabled hardware accel based on different circumstances, especially on the transition to ICS and JB.

JlUgia avatar Jul 10 '15 09:07 JlUgia

Sloved after adding this parameter on the manifest.xml <application android:hardwareAccelerated="true" android:largeHeap="true"> Thanks

mhemdan avatar Jul 10 '15 20:07 mhemdan

Yeah, still would be great to avoid devs facing this issue. When it doesn't work on software we should probably force hardware.

JlUgia avatar Jul 10 '15 20:07 JlUgia

solved it @JlUgia
by adding android:hardwareAccelerated="true"

Thanks man

nikunjparadva avatar Mar 22 '19 06:03 nikunjparadva

And this one looks like a dupe.

JlUgia avatar Mar 23 '19 12:03 JlUgia

not working

jsquarede avatar Apr 10 '19 12:04 jsquarede

please give solution fast

jsquarede avatar Apr 10 '19 12:04 jsquarede