Am I am trying to make a popup menu to pop up over the cell that the user long-clicks on. But if I use the ACMenu popup menu:
B4X:
Sub DG_ItemLongClick(Position As Int)
Dim Pop As ACPopupMenu
Pop.Initialize("Popup", DG )
Pop.AddMenuItem(1, "Delete", Null)
Pop.AddMenuItem(2, "Rearrange", Null)
Pop.Show
End Sub
The menu will popup near the grid's top left corner and not above the cell being long-clicked.
This must be because I passed "DG" (the datagrid) as the view for the popup menu.
So, it there a way to detect the view under the user's finger that I can pass to the popup routine so it will make the menu appear over the cell the user is touching?
I've been trying and I can't figure out how to get any view from the selected grid. "Sender" returns a "non android.view.view" case error, so that won't work either.