Android Question B4XSignatureTemplate size

PHB2

Member
Licensed User
Longtime User
I am using a B4XSignatureTemplate in my app. I took the code and adapted it from the B4xViews tutorial and sample code.

How can I change the size of the signature area when displayed on the screen?

Code below:

B4X:
Sub Signature1Button_Click
    Dialog.ButtonsFont = XUI.CreateFontAwesome(20)
    
    Dim rs As ResumableSub = Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C), "", Chr(0xF00D))
    
    Dialog.GetButton(XUI.DialogResponse_Positive).TextColor = XUI.Color_Green
    Dialog.GetButton(XUI.DialogResponse_Cancel).TextColor = XUI.Color_Red
    Dialog.ButtonsFont = XUI.CreateDefaultBoldFont(15) 'return it to the default font. It will no longer affect the current dialog
    
    Wait For (rs) Complete (Result As Int)
    If Result = XUI.DialogResponse_Positive Then
        SignatureImage1.SetBitmap(SignatureTemplate.Bitmap.Resize(SignatureImage1.Width, SignatureImage1.Height, True))
        Dim out As OutputStream = File.OpenOutput(WorkingPath, "signature1.png", False)
        SignatureTemplate.Bitmap.WriteToStream(out, 100, "PNG")
        out.Close
    End If
    
End Sub
 
Top