Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private PrefDialog As PreferencesDialog
End Sub
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
PrefDialog.Initialize(Root, "Edit", 300dip, 200dip)
PrefDialog.SetEventsListener(Me, "PrefDialog")
PrefDialog.LoadFromJson(File.ReadString(File.DirAssets, "template.json"))
Button1_Click
End Sub
Private Sub Button1_Click
Dim item As Map
item.Initialize
item.Put("Item 1", "value 1")
item.Put("Item 2", "")
Dim ps As Object = PrefDialog.ShowDialog(item, "OK", "CANCEL")
Wait For (ps) Complete...