gcacace / android-signaturepad

A custom Android View for drawing smooth signatures
Apache License 2.0
2.76k stars 640 forks source link

Add attr for not saving state. #151

Open PieterPicup opened 4 years ago

PieterPicup commented 4 years ago

Saving state sometimes caused android.os.TransactionTooLargeException. If users do not require state saving it can be turned off.

bismarabia commented 3 years ago

I can confirm the crash is coming from inside Signature.java$onSaveInstanceState() method. I attached a debugger in there and set bundle as null at the end the crash didn't happen.

Preserving the state is important but I think @gcacace should come up with a better way to save bitmap into state.

gustavocnp95 commented 2 years ago

@PieterPicup @bismarabia We just created a fork and published with the fix keeping the state saving. For use it you should:

Set jitpack.io url on your project's build.gradle

allprojects {
    repositories {
        google()
        maven { url "https://jitpack.io" }
   }
}

and then, add into your depedencies this:

implementation 'com.github.prologapp:android-signaturepad:1.0.0'