B4A Library SignPad V0.20 - Signature Capture - incl Java source

SignPad
Version:
0.20

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

For those who want to play with the library or mayybe to extend
i have included the java source of this library so you can change it by yourself and then recompile the lib with SLC. Have fun


This wrapper is based on this

header.png

  • SignPad
    Events:
    • onSigned (sign As Bitmap)
    Methods:
    • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
    • Capture
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • clear
    • getAlbumStorageDir (albumName As String) As File
    • saveBitmapToJPG (bitmap As Bitmap, photo As File)
    Properties:
    • Left As Int
    • SignatureBitmap As Bitmap [read only]
    • Top As Int
    • TransparentSignatureBitmap As Bitmap [read only]

For those who want to extend the library i have attached the java-source of this library. FEEL FREE TO MODIFY IT
 

Attachments

  • libSignPad_0.16.zip
    9.8 KB · Views: 606
  • libSignPad_0.17.zip
    9.9 KB · Views: 625
  • LibSignPadv0.20.zip
    10.8 KB · Views: 1,062
  • SignaturePad_JAVASOURCE020.zip
    38 KB · Views: 865
  • SignPadEx.zip
    12.9 KB · Views: 1,026
Last edited:

Beja

Expert
Licensed User
Longtime User
Hi Don and all,
This is an old post, but I visited here again today and found it very simple for my purpose.. at more than 65 my
memory is less than perfect :). and I see so many version and contributions from Don and others.. someone help
please with the last and final version of this great project.

Best regards, -b
 

AnandGupta

Expert
Licensed User
Longtime User
someone help
please with the last and final version of this great project.
check
it has signature template
 

Beja

Expert
Licensed User
Longtime User
check
it has signature template

Hi Anand,
Thanks but I am looking for the final version and project example of this post.. the same post that we are in right now. (Don's post)
 

DonManfred

Expert
Licensed User
Longtime User
for the final version and project example
There ´ll be no more versions. As the library is from 2015 i know i do not have the source anymore (HDD crash in 2016).
Do not expect any new here. Use the library in #1. Example is in #1 too.

If it´s fit your needs; great. If not; search for alternatives.
 

netsistemas

Active Member
Licensed User
Longtime User
i have a version that donmanfred showme long tome allow
can you allowme shared in this thread?
 

netsistemas

Active Member
Licensed User
Longtime User
This is the original source code for develpment in eclipse/java, and other with a little change for my proyect (touchmadmio) (point over de 'i' are not allowd in original).

inside tochpadmio, have the folfer 'libreriasparab4a': jar and xml

i'm not sure this code are that you need or other more old.
 

Attachments

  • SignaturePad_Original.zip
    27.1 KB · Views: 181
  • TouchPadMio.zip
    111.8 KB · Views: 179

netsistemas

Active Member
Licensed User
Longtime User
I encourage you to do it. I can't right now, maybe next week. It is not complicated and you will open up new possibilities.
 

netsistemas

Active Member
Licensed User
Longtime User
(in spain we say: 'el rascar es todo empezar' - scratching is all beginning)

doit:
- install eclipse
- do a simple change:
* in signPad.java added this code:



ba.raiseEvent(this, eventName + "_onclear");

B4X:
    @Override
      public void onClear() {
          BA.Log("onClear() evento rav");

          ba.raiseEvent(this, eventName + "_onclear");
          //mSaveButton.setEnabled(false);
          //mClearButton.setEnabled(false);
      }
    };


- install https://www.b4x.com/android/forum/t...-libraries-without-eclipse.29918/#post-173756
and compile

problems:
* b4DocLet are not in my computer (view previous thead)
* case sensitive : ba.raiseEvent(this, eventName + "_onClear"); (C in Clear must be minus!!)

And now, incluye in your B4A proyect the detect event:
B4X:
Sub SignaturePad_onSigned(sign As Object)
    If ValidarDniYNombre = False Then
   
        SignaturePad.clear
        SignaturePad.Tag = ""
        MsgboxAsync("Complete Nombre y apellidos,  y  DNI con 9 caracteres. No indique guiones","Faltan datos")
    Else
        SignaturePad.Tag = "Firmado"
    End If
   
End Sub


'this event are raised a lot of times.
Sub SignaturePad_onClear()
'    MsgboxAsync ("Borrado","Borrado")
End Sub

importan:
may be is better use:

now i have a problem with this library in my proyect:
error pasing librarie
com.github.gcacace.signaturepad.views
signaturepad.strokewidth alrady existe
and the version is 0.0 with the previous are 0.22
i think the problem is the commple method ( in previus version 5 year ago!!! i compile with javadoc ...)
i go to use the previous version in my proyect.

my be the correct implements are in official touchpad of DonManfred.
 

Attachments

  • TouchPadMio.zip
    12.1 KB · Views: 9
Last edited:

netsistemas

Active Member
Licensed User
Longtime User
(at the risk of being annoying, but for leaving everything documented:)

You have to include com.github in the compiler that I mentioned, as I have seen in another thread.
This is:
-b4aignore: org,com.android,com.example,com.hoho,com.github

But anyway the XML has some different entries that makes my project fail to compile.


Attach images.
 

Attachments

  • error1.png
    error1.png
    17.2 KB · Views: 14
  • error1.png
    error1.png
    134 KB · Views: 11
  • error1.png
    error1.png
    40.6 KB · Views: 11
  • compilar.png
    compilar.png
    70.3 KB · Views: 10
Top