Android Question How to have dialog box with a custom List ?

voxel

Member
Licensed User
Hello,
I would like to display a dialog box with a custom list. I've tried several examples on the forum but I can't.
I tried with: https://www.b4x.com/android/forum/threads/b4x-xui-b4xdialog-custom-dialogs.99756/

diaglogFavori: panel with a list
DialogShow: in the example, there is an extra parameter :-(

B4X:
Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 300dip, 170dip) 'set the content size
    p.LoadLayout("dialogFavori")
    
    Dim rs As ResumableSub = Dialog.Show(p,"Yes", "No", "Cancel")
    Wait For (rs) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        'do something
    End If

Here is my test code which does not work:

Thanks for your help.

PS : I also tried this example, without success : https://www.b4x.com/android/forum/threads/customlayoutdialog-with-customlistview.82259/#content
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…