Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smalam119/Easy-Signature-Android
Android library which provides a signature view.
https://github.com/smalam119/Easy-Signature-Android
android java
Last synced: 6 days ago
JSON representation
Android library which provides a signature view.
- Host: GitHub
- URL: https://github.com/smalam119/Easy-Signature-Android
- Owner: smalam119
- License: apache-2.0
- Created: 2017-12-25T19:56:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-01T18:24:37.000Z (almost 7 years ago)
- Last Synced: 2024-08-16T14:34:33.400Z (4 months ago)
- Topics: android, java
- Language: Java
- Homepage:
- Size: 342 KB
- Stars: 24
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android - Easy-Signature-Android - An simple ui library that provides a plugable signature view. (Libraries / GUI)
- awesome-android - Easy-Signature-Android - An simple ui library that provides a plugable signature view. (Libraries / GUI)
README
# Easy-Signature-Android
Easy signature is an ui library that provides android developer with a plugable signature view. This view can be added as an activity in the project.
Features
=======* A signature view provided as a activty.
* Signature is returned in either bitmap or array of bytes.
* Callbacks for okay and cancel button.
* Cross button to clear view.
* Editable sub-text
* Signature date.Download
=======First, add this in your root build.gradle:
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Then, go to the module level build.gradle file and add,```groovy
dependencies {
compile 'com.github.smalam119:Easy-Signature-Android:0.3.0'
}
```
Example
=======The example is quite straightforward and documented in comments. Just create a class and extend 'SignatureViewActivity' then implement accordingly. Remember to register the class as an activity in manifast file.
```java
public class DemoSignatureViewController extends SignatureViewActivity {
private Date mDate;
private Bitmap mSignatureBitmap;
private byte[] mSignatureInBytes;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//set sub text
this.setSubText("I accept the nothingness and meaninglessness of life");
}//call back for done button click. returns bitmap
@Override
public void onClickDone(Bitmap bitmap) {
mDate = this.getDate(); //get the date of the signature
mSignatureBitmap = bitmap; // signature in bitmap
}//call back for done button click. returns array of byte
@Override
public void onClickDone(byte[] bytes) {
mSignatureInBytes = bytes; //signature in bytes
}//callback for cancel button click
@Override
public void onClickCancel() {
}}
```
Author
=======
* **Sayed Mahmudul Alam**License
=======Copyright 2017 Sayed Mahmudul Alam
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.