iOS Question Problem with XUI Views Dialog buttons

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all

I have a problem with this line in XUI Examples Dialog buttons
B4X:
Sub btnSignature_Click
    Dialog.ButtonsFont = XUI.CreateFontAwesome(20)
    'the dialog is created here:
    
    '0xF00C - current no frame
    '0xF058 - circle
    '0xf14A - square
    
    Dim rs As ResumableSub = Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C), "", Chr(0xF00D))
    'Dim rs As ResumableSub = Dialog.ShowTemplate(SignatureTemplate, "Yes", "", "Cancel")
    
    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
        ImageView1.SetBitmap(SignatureTemplate.Bitmap.Resize(ImageView1.Width, ImageView1.Height, True))
        Dim out As OutputStream = File.OpenOutput(File.DirDocuments, "signature.png", False)
        SignatureTemplate.Bitmap.WriteToStream(out, 100, "PNG")
        out.Close
    End If
End Sub

If I put #MinVersion: 11 - it looks Ok (see the attached screenshots). If I change it to #MinVersion: 15 or #MinVersion: 16 - I see some numbers instead of Font Awesome icons.
I tried to change the Chr(0xF00C) to Chr(0xF058) or to Chr(0xf14A) - the same issue.

If I replace the icons with a text - it works. But doesn't look good.

Thanks.
 

Attachments

  • Signature 15.jpg
    Signature 15.jpg
    49.9 KB · Views: 80
  • Signature 11.jpg
    Signature 11.jpg
    47.1 KB · Views: 77
Solution
Change that line to:
B4X:
Dim rs As ResumableSub = Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C).As(String), "", Chr(0xF00D).As(String))

aeric

Expert
Licensed User
Longtime User
If you put "" & Chr(0xF00C), is it working?
 
Upvote 0
Top