i am trying to place a menu panel over customlistview item something like popup menu.
i tried to work in on itemclick event like following
but when there is too many items or i resize the Xclv when keyboard showing the popupmeu top position changed to unexpected position and some times disappeard .
any idea what i am doing wrong ?
i tried to work in on itemclick event like following
B4X:
Private Sub clv_ItemClick (Index As Int, Value As Object)
Dim itemgetoff As Int
Dim clvitem As CLVItem
'First I get the rawList Item
clvitem = clv.GetRawListItem(Index)
' then i set the popmenu left position
popupMenu.AsView.Left = clvitem.Panel.Width - 300dip
' then i check if the clv scroll content height is bigger than clv height then
' i set the itemgetoff variable to globaloffset
' that i have set based on scroll change event
If clv.sv.ScrollViewContentHeight > clv.AsView.Height Then
itemgetoff = globaloffset
Else
itemgetoff = 0
End If
' then i set the popupmenu top position to be showin over the clicked item
popupMenu.AsView.Top = clvitem.Offset + (clvitem.Panel.Height) - itemgetoff
End Sub
but when there is too many items or i resize the Xclv when keyboard showing the popupmeu top position changed to unexpected position and some times disappeard .
any idea what i am doing wrong ?