Android Question Modal UI in B4a

Discussion in 'Android Questions' started by Tasyo28, Jul 17, 2019.

  1. Tasyo28

    Tasyo28 Member Licensed User

    Hi,

    Possible to achieve this in B4a? (see image)

    -modal ui popup image
    -insert qr code
    -transparent background
    -popup animation
    -close button


    Can somebody point me to right direction what i need to use to achieve this.

    upload_2019-7-17_16-59-22.png

    Thank you very much :)

    Regards,
    Tasyo
     
    Last edited: Jul 17, 2019
  2. mcqueccu

    mcqueccu Active Member Licensed User

    Sure, its very possible and easy to do with B4A. Check out Custom Dialogs

    You can also create it manually,

    Add a panel
    -Add your image as a background
    -Use QR Generator to create your QRCode and place it on the panel
    -Use a lable or another panel and insert the close icon image and position it well.
    -Send this panel to back or make it invisible (To call it, make it visible or bring it to front) depending on the one you use.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. Tasyo28

    Tasyo28 Member Licensed User

    Thank you very much mcqueccu!
     
  5. Tasyo28

    Tasyo28 Member Licensed User

    Hi Erel,

    I tried your suggestion and works very well, but i have a question how to remove custom buttons in dialog (ok and cancel)
    (i want it to be clean and plain panel with image and buttons only)
    Code:
    Wait For (dialog.ShowCustom(p, "OK""""CANCEL")) Complete (Result As Int)
            
    If Result = xui.DialogResponse_Positive Then
                dialog.Show(fieldFirstName.Text & 
    " " & fieldLastName.Text, "OK""""")
            
    Else
            
    End If
    how to capture/listen to the buttons inside the panel i made using xui dialog?

    Regards,
    Tasyo
     
  6. mcqueccu

    mcqueccu Active Member Licensed User

    Pass empty String in place of the Ok and cancel like this

    Code:
    Wait For (dialog.ShowCustom(p, "OK""""CANCEL")) Complete (Result As Int)
    TO

    Code:
    Wait For (dialog.ShowCustom(p, """""")) Complete (Result As Int)
     
    Erel likes this.
  7. Erel

    Erel Administrator Staff Member Licensed User

    Nothing special. Handle the events like all other events.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice