Kotlin MIT

android-signaturepad

Android Signature Pad is an Android library for drawing smooth signatures

W

warting

Dernière activité 27 août 2026
warting/android-signaturepad

180

étoiles

40

forks

9

issues ouvertes

androidandroid-librarysignaturesignature-pad

Ce README est souvent en anglais.

Maven Central

Android Signature Pad

Android Signature Pad is an Android library for drawing smooth signatures. It uses variable width Bézier curve interpolation based on Smoother Signatures post by Square.

Screenshot

Features

  • Bézier implementation for a smoother line
  • Variable point size based on velocity
  • Customizable pen color and size
  • Bitmap, SVG and Raw-data support

Installation

Latest version of the library can be found on Maven Central.

For Gradle users

Open your build.gradle and make sure that Maven Central repository is declared into repositories section:

   repositories {
       mavenCentral()
   }

Then, include the library as dependency:

implementation 'se.warting.signature:signature-pad:<latest_version>' // jetpack Compose views

or

implementation 'se.warting.signature:signature-view:<latest_version>' // legacy android views

Usage

Please see the /app example app for a more detailed code example of how to use the library.

  1. Add the SignaturePad view to the layout you want to show.
var signaturePadAdapter: SignaturePadAdapter? = null

SignaturePadView(onReady = {
    signaturePadAdapter = it
})

Button(onClick = {
    Log.d("", signaturePadAdapter?.getSignatureSvg() ?: "null")
}) {
    Text("Save")
}
  1. Configure attributes.
  • penMinWidth - The minimum width of the stroke (default: 3dp).
  • penMaxWidth - The maximum width of the stroke (default: 7dp).
  • penColor - The color of the stroke (default: Color.BLACK).
  • velocityFilterWeight - Weight used to modify new velocity based on the previous velocity ( default: 0.9).
  • clearOnDoubleClick - Double click to clear pad (default: false)
  1. Get signature data
  • getSignatureBitmap() - A signature bitmap with a default white background. You can also customize the image's coloring e.g. getSignatureBitmap(backgroundColor: Int, penColor: Int)

  • getTransparentSignatureBitmap(trimBlankSpace: Boolean = false) - A signature bitmap with a transparent background. Set trimBlankSpace = true to crop the bitmap to the signature bounds, removing surrounding blank space. You can also customize the image's coloring, e.g. getTransparentSignatureBitmap(penColor: Int)

  • getSignatureSvg() - A signature Scalable Vector Graphics document.

Projets similaires

A custom Android View for drawing smooth signatures

Java
Ggcacace
2,8 k étoiles647

HTML5 canvas based smooth signature drawing

TypeScriptcanvasdrawingjavascript
Sszimek
12 k étoiles2,2 k

[サイン] A Compose Multiplatform library for capturing and exporting signatures as ImageBitmap with customizable options. Perfect for electronic signature, legal documents and more.

Kotlincompose-multiplatformdigital-signaturedocuments
Jjoelkanyi
235 étoiles10