Android Question Modal, but async popup menu dialog

peacemaker

Expert
Licensed User
Longtime User
HI, All

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.
 

peacemaker

Expert
Licensed User
Longtime User
Creating fast and simple 15 menu lines (or another variable qty) - it's ... bad idea to use custom dialogs, better to have special class.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Creating fast and simple 15 menu lines (or another variable qty) - it's ... bad idea to use custom dialogs, better to have special class.
So this:
B4X:
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
Isn't fast & simple enough for you?

- Colin.
 
Upvote 0
Top