gcacace / android-signaturepad

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

签名页面置于后台,会瞬间崩溃。 #181

Closed longkiGit closed 6 months ago

longkiGit commented 6 months ago

@Override protected Parcelable onSaveInstanceState() { try { Bundle bundle = new Bundle(); bundle.putParcelable("superState", super.onSaveInstanceState()); if (this.mHasEditState == null || this.mHasEditState) { this.mBitmapSavedState = this.getTransparentSignatureBitmap(); } bundle.putParcelable("signatureBitmap", this.mBitmapSavedState); return bundle; } catch(Exception e) { Log.w(TAG, String.format("error saving instance state: %s", e.getMessage())); return super.onSaveInstanceState(); } } Bundle 超出崩溃。

longkiGit commented 6 months ago

问题修复 @OverRide protected Parcelable onSaveInstanceState() { return super.onSaveInstanceState(); }