Sub btnCustom2_Click
Dim cd As CustomDialog2
Dim pnl As Panel
pnl.Initialize("pnl")
Dim bgnd As ColorDrawable
bgnd.Initialize(Colors.Cyan, 5dip)
pnl.Background = bgnd
Dim btn1 As Button
btn1.Initialize("btn1")
btn1.Text = "Press me"
pnl.AddView(btn1, 80dip, 50dip, 60dip, 60dip)
lbl1.Initialize("")
pnl.AddView(lbl1, 50dip, 120dip, 120dip, 60dip)
Dim lv As ListView
lv.Initialize("lv")
lv.AddTwoLinesAndBitmap("one", "one", Null)
lv.AddTwoLinesAndBitmap("two", "one", Null)
lv.AddTwoLinesAndBitmap("three", "one", Null)
pnl.AddView(lv, 300dip, 120dip, 120dip, 250dip)
cd.AddView(pnl, 77%x, 60%y) ' sizing relative to the screen size is probably best
ret = cd.Show("B4A Custom Dialog", "Yes", "No", "Maybe", Bmp)
ToastMessageShow(ret,True)
End Sub
Sub btn1_Click
lbl1.Text = "Pressed!"
lbl1.Color = Colors.Black
ToastMessageShow("Pressed!", False)
End Sub