Public Sub ShowCustom2( title As String, Cont As String, btnYes As String, btnno As String) As ResumableSub
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 300dip, 350dip)
p.LoadLayout("CustomDialog")
lblTitle.Text = title
lblContent.text = Cont
Button1.Text = btnYes
Button2.Text = btnno
dlg.PutAtTop = True
Dim sf As Object = dlg.ShowCustom(p, "", "", "")
dlg.Base.top = (100%y /2) - (dlg.Base.Height /2)
p.Height = dlg.Base.Height
Wait For (sf) complete (result As Int)
Return result
End Sub
Private Sub Button1_Click
'how To close the dialog
'And with 'reply' back to the calling activity
'close the dialog
dlg.Close(xui.DialogResponse_Positive)
End Sub
Private Sub Button2_Click
'how To close the dialog
'And with 'reply' back to the calling activity
'close the dialog
dlg.Close(xui.DialogResponse_negative)
End Sub