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

BarryW

Active Member
Licensed User
Longtime User
Is there any way to change the background of your library or put an image to it?
Tnx...
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hi again Manfred ,

I tried modifying source but when compiling with SLC and refreshing Libraries list I get this error :

B4X:
Error Parsing Libraries
com.github.gcacace.signaturepad.views.SignaturePad.strokewidth already exists.

I even commented strokewidth functions in original library and in wrapper but still the same error .
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
you need to add
com.github
to your b4ignore directive

If it is already empty then enter com.github
If not then add ",com.github" at the end

Thanks a lot
I added a function to set paint color to attached version .
 

Attachments

  • SignPad.zip
    11.4 KB · Views: 408
  • SignPadSrc.zip
    37.1 KB · Views: 377

rafaelmotaquintana

Active Member
Licensed User
I get this error when trying the sample code published

B4A version: 5.50
Parsing code. (0.00s)
Compiling code. Error
Error compiling program.
Error description: Object reference not set to an instance of an object.
Occurred on line: 39
SignaturePad.Capture(False)
Word: (
 

fixit30

Active Member
Licensed User
Longtime User

How can we know what the problem is if you don't post your code?
 

alon

Active Member
Licensed User
Longtime User
Hi ,
Is there a way to know if the signpad is clear/empty.

Thanks
 

Rusty

Well-Known Member
Licensed User
Longtime User
Great library...
I noticed several people asking if the signature has to occur with one line (i.e. touch and not lift until finished).
However, most people lift their finger during signature. For Example: John Smith would be at LEAST two touches.
However, when you lift your finger presumably after the word "John" is complete. the signature is finished and the event "onsigned" fires and the game is over...
Is there a way to allow John to lift his finger and then sign Smith without terminating the signature without firing the event?
(or to restart the signature and combine the strokes into one image)
thanks
Rusty
 
Last edited:

netsistemas

Active Member
Licensed User
Longtime User
This is good solution and with qualty (don´t forget donate).

But,
How put a DOC / POINT in a sign?
Move point to point are ok, but if you need put a DOC over the 'i' , the library does not recognize the touch on the screen.
I can try to get this case in panel touch or similar, but i think that this is not good solution.
 

netsistemas

Active Member
Licensed User
Longtime User
I install eclipse and your source code, config and view and understand your great code and DO IT!

(I change the JAVA library source code)

Important: There are several versions, you must get the last. This last version have any adicional property:

In B4A proyect add this code:
SignaturePad.StrokeWidth=5

SignaturePad.StrokeWidth=Value

In this version you can change the line with.

The first version is more pretty (i think), because have other tecnich for get the stock with, but is not easy for me implement the DOC over 'i' letter).

Solution (for java proyect):
In signaturePad.Java i add only one code line and works.


B4X:
    @Override
    public boolean onTouchEvent(MotionEvent event){
        float eventX = event.getX();
        float eventY = event.getY();

        switch (event.getAction()){
        case MotionEvent.ACTION_DOWN:
            getParent().requestDisallowInterceptTouchEvent(true);
            mPoints.clear();
            mPath.moveTo(eventX, eventY);
            mLastTouchX = eventX;
            mLastTouchY = eventY;
            addPoint(new TimedPoint(eventX, eventY));
            //ralonso add jun 2018 - it the stockwith is 1, the doc are not visible
            // SignaturePad.StrokeWidth=5 in B4A (upper than 1)
            addPoint(new TimedPoint(eventX+1, eventY));
 

Attachments

  • TouchPadMio_library.zip
    19.6 KB · Views: 292
Last edited:

netsistemas

Active Member
Licensed User
Longtime User
I inclued:
B4X:
    @Override
    public boolean onTouchEvent(MotionEvent event){
        
        //mayo 2020
 if (this.mStrokeWidth > 1 )
 {

you, now set StokeWith to cero, for to enabled false the touch pad.
 

Attachments

  • TouchPadMio_2020May.zip
    13.9 KB · Views: 302
Cookies are required to use this site. You must accept them to continue using the site. Learn more…