Skip to content

1.4.0 — crash fixes & modernization

Latest

Choose a tag to compare

@gcacace gcacace released this 24 Jul 15:08

The first release since 1.3.1 (March 2020) — the library is active again. 🎉

This is a crash-fix and modernization release. The Java/XML public API is unchanged, so it's a drop-in update for existing consumers on minSdk 21+ (see Breaking changes).

Installation

implementation 'com.github.gcacace:signature-pad:1.4.0'

⚠️ Breaking changes

  • minSdk raised from 14 to 21. The library targets AndroidX and the modern Android Gradle Plugin, whose practical baseline is API 21 (Lollipop); API 14–20 has effectively zero active-device share. No source/binary API signatures changed — consumers still on minSdk < 21 simply can't upgrade to this release.

🐛 Fixed

  • Background/rotation crash Could not copy bitmap to parcel blob / TransactionTooLargeException (#178, #169, #183, #182, #187, #171). The signature is now persisted as a size-capped PNG byte[] instead of a raw Bitmap in the saved-state Bundle, so it never takes the parcel-blob path.
  • Zero-bounds save crash width and height must be > 0 (#145, #179, #123) — Bitmap.createBitmap dimensions are clamped to ≥ 1px.
  • Single taps didn't render a dot (#41, #131, #173, #105) — a dot is now painted for zero-length curves.
  • getTransparentSignatureBitmap(true) cropped one row/column of ink (#64) — trimming now uses inclusive bounds.
  • getSignatureSvg() was empty after a rotation — SVG paths are persisted alongside the PNG and restored, using the original view dimensions as the viewBox.
  • SvgBuilder.build() was not idempotent (#75) — reading the SVG twice no longer duplicates the last stroke.
  • Restore now honours saved state from older library versions and survives a re-save before the first layout pass.

✨ Added

  • SvgBuilder.getInnerPaths() / restorePaths(String) — helpers backing SVG persistence across configuration changes.

🔧 Under the hood

  • Build system revived: Gradle 6.2.2 → 8.13, AGP 3.6.1 → 8.11.1, jcenter() → Maven Central.
  • Publishing moved from the discontinued Bintray pipeline to the Sonatype Central Portal (coordinate unchanged: com.github.gcacace:signature-pad).
  • CI (GitHub Actions), a JUnit + Robolectric test suite, and community health files (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, issue/PR templates) added.

See the CHANGELOG for full details and behavior notes.

Full Changelog: 1.3.1...1.4.0