Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private Button1 As B4XView
Private Dialog As B4XDialog
Private InputTemplate As B4XInputTemplate
End Sub
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
Dialog.Initialize(Root)
InputTemplate.Initialize
InputTemplate.lblTitle.Text = "Enter button text"
End Sub
Private Sub Button1_Click
Wait For (Dialog.ShowTemplate(InputTemplate, "Ok", "", "Cancel")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Button1.Text = InputTemplate.Text
End If
End Sub