sub Globals
Private MyTabHost As TabHost
Private MyDialog As B4XDialog
Dim MyPanel As B4XView
end sub
private Sub ShowDialog
If Not (MyPanel.IsInitialized) Then MyPanel= xui.CreatePanel("")
MyPanel.SetLayoutAnimated(0, 0, 0, Activity.Width,Activity.Height-40dip)
MyPanel.LoadLayout("Layout_0")
MyTabHost.AddTab("Tab_1/","Layout_1")
MyTabHost.AddTab("Tab_2/","Layout_2")
MyDialog.Initialize(Activity)
MyDialog.Title="....."
'populate MyDialog views
Wait For (MyDialog.ShowCustom(MyPanel, "OK", "", "CANCEL")) Complete (Resu As Int)
If Resu = xui.DialogResponse_Positive Then
' retrieve Data from MyDialog
end if
End Sub