iOS Question CustomListView scroll lock

cwt

Active Member
Licensed User
I have a CustomListView with a lot of other views on it and on the bottom have a signature capture panel. The signature capture does not work well at all because the parent CustomListView moves all the time while the signature is being drawn with a finger. Is there a way to lock the CustomListView to prevent scrolling during the signature capture process - such as a Lock-Unlock button that runs code to cause the scrolling to be temporarily suspended? Using B4i v6.80 with B4XPages.
 

cwt

Active Member
Licensed User
I think I will just go with a separate page for the signature capture. I tried B4XDialog + B4XSignatureTemplate but I would rather have the signature embeded in the page rather than use a popup.

A little unrelated but in B4A I use the below code to see if the signature was actually entered:

B4X:
Sub Globals
    Dim Panel1 As Panel
    Dim Canvas1 As Canvas
    Dim SD As SignatureData 'This object holds the data required for SignatureCapture
    Dim PointCount As Int
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("customer_signature_capture")
    Activity.Title = "job " & JobList.MasterJobNumber & " - Customer Invoice Signature"
    Canvas1.Initialize(Panel1)
    SD.Initialize
    SD.Canvas = Canvas1
    SD.Panel = Panel1
    SD.SignatureColor = Colors.Black
    SD.SignatureWidth = 3dip 'Stroke width
 End Sub

Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
    SignatureCapture.Panel_Touch(SD, x, y, Action)
    PointCount = PointCount + 1
End Sub

Sub btnSave_Click
    If PointCount = 0 Then
        Msgbox2("The customer must sign in the signature box.","Error","OK","","",Null)
        Return
    End If
    If PointCount < 50 Then
        Msgbox2("The signature is insuffient. Please re-sign.","Error","OK","","",Null)
        SignatureCapture.Clear(SD)
        PointCount = 0
        Return
    End If
End If

How can I do the same thing in B4i?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Cross platform signature capture code is available in B4XSignatureTemplate. It is inside the XUI Views.b4xlib file (=zip file). Shouldn't be too complicated to use that code, with some modifications, without B4XDialog.

Though the truth is that you are doing unnecessary work. You can make B4XDialog look like a page instead of a dialog.
 
Upvote 0
Top