Do we have such for Android ? Like Popup Menu/List Library
It seems, that this modal lib dialog is using the CPU very much when the menu is visible, and some troubles due to this for background task.
Sub Activity_Click
Dim cd As CustomLayoutDialog
cd.ShowAsync("Choose item", "", "", "", Null, False)
cd.SetSize(100%x, 100%y) 'request maximum size
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
1. Don't use CustomLayoutDialog for new projects.
2. Use B4XDialog. Cross platform and fully customizable.
3. In this case you can use B4XListTemplate.