Sub Activity_Click
Dim cd As CustomLayoutDialog
Dim cdlg As Object = cd.ShowAsync("Choose item", "", "", "", Null, False)
cd.SetSize(100%x, 100%y)
Dim jo As JavaObject = cdlg
Dim warna As ColorDrawable
warna.Initialize(Colors.Transparent,0)
jo.RunMethodJO("getWindow",Null).RunMethod("setBackgroundDrawable", Array(warna))
Wait For Dialog_Ready (DialogPanel As Panel)
DialogPanel.LoadLayout("CustomDialogLayout")
For i = 1 To 20
CLVDialog.AddTextItem("Item #" & i, i)
Next
Wait For CLVDialog_ItemClick (Index As Int, Value As Object)
Log("Selected item: " & Value)
cd.CloseDialog(DialogResponse.POSITIVE)
End Sub