Sub Class_Globals
Private xui As XUI
Private Dialog As B4XDialog
Private lbMess As Label
Private lbTitle As Label
Private img As ImageView
Private rs As ResumableSub
End Sub
Public Sub Initialize(act As Activity)
Dialog.Initialize(act)
End Sub
Sub Show(title As String,message As String,Ok As String,Cancel As String,No As String, icon As Bitmap) As ResumableSub
Dim x As B4XView = xui.CreatePanel("")
x.SetLayoutAnimated(0, 0, 0, 340dip, 25%y)
x.LoadLayout("dlgdetail")
Dialog.PutAtTop = True
Dialog.BorderWidth = 2dip
Dialog.BorderCornersRadius = 6dip
Dialog.BorderColor = Colors.Blue
Dialog.BackgroundColor = Colors.LightGray
Dialog.OverlayColor = 0x80808080
lbTitle.Padding=Array As Int (img.Width+4dip, 0dip, 0dip, 0dip)
lbTitle.Text=title
lbMess.Text=message
img.Bitmap=icon
rs = Dialog.ShowCustom(x, Ok, No, Cancel)
Wait For (rs) Complete (Result As Int)
Return Result
End Sub