Giter VIP home page Giter VIP logo

e-signature's Introduction

签名效果预览

Gradle引用

implementation 'com.github.youhongye:E-Signature:1.0'    

jitpack要求在工程 根目录build.gradle中添加如下:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

使用文档

xml布局文件使用

<com.ylly.signature.view.SignatureView
        android:id="@+id/signature_view"
        android:layout_width="match_parent"
        android:layout_height="300dp"/>

画笔属性

app:paintColor  	画笔颜色,默认黑色
app:paintMaxWidth	画笔最大宽度
app:paintMinWidth	画笔最小宽度

保存画板 save()

/**
 * @param path       保存到路径
 * @param clearBlank 是否清楚空白区域
 * @param blank      边缘空白区域
 * @param isEncrypt  加密存储,选择加密存储会自动追加后缀为.sign
 */
save(String path, boolean clearBlank, int blank, boolean isEncrypt)

设置画笔颜色 setPaintColor()

/**
 * @param paintColor	画笔颜色
 */
setPaintColor(int paintColor)

设置画笔宽度 setPaintWidth()

/**
 * @param mMinWidth	最小宽度
 * @param mMaxWidth	最大宽度
 */
setPaintWidth(int mMinWidth, int mMaxWidth)

清除画板 clear()

clear()

是否存在签名 isSign()

isSign()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.