Android Question ULV - popup menu?

Misterbates

Active Member
Licensed User
I've been searching the forums but can't find an answer and wondered if any other ULV users had already solved this.

I'm using ULV to show a scrollable list of items and wanted to put a "more" image (three vertical dots) on the right of each list item that when pressed would pop-up a context menu over the item.

Any clues or solutions for doing this?

Thanks,
Misterbates.
 

johndb

Active Member
Licensed User
Longtime User
I've been searching the forums but can't find an answer and wondered if any other ULV users had already solved this.

I'm using ULV to show a scrollable list of items and wanted to put a "more" image (three vertical dots) on the right of each list item that when pressed would pop-up a context menu over the item.

Any clues or solutions for doing this?

Thanks,
Misterbates.
Yes, it can and has been done. I'm at work but will send you instructions later today.

SnipImage.JPG
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I've been searching the forums but can't find an answer and wondered if any other ULV users had already solved this.

I'm using ULV to show a scrollable list of items and wanted to put a "more" image (three vertical dots) on the right of each list item that when pressed would pop-up a context menu over the item.

Any clues or solutions for doing this?

Thanks,
Misterbates.
An ImageView with a tree-dot image -> Click event of the ImageView -> you display whatever you want over the ULV. I can't see what's blocking you.
 
Upvote 0

johndb

Active Member
Licensed User
Longtime User
I've used thedesolatesoul's id library https://www.b4x.com/android/forum/threads/popup-menu-list-library.11136/#post-62162, but it pops up in the middle of the display.

How do I find the coordinates of the clicked ULV item to position the popup over it?
A simpler method would be to use a popup menu that uses a view as an anchor. You would then use the 3 dot "more" image (view) as the anchor. The library that I use is https://www.b4x.com/android/forum/threads/stdactionbarhelper-utilities-for-the-standard-actionbar.36898/.

SnipImage.JPG
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I've used thedesolatesoul's id library https://www.b4x.com/android/forum/threads/popup-menu-list-library.11136/#post-62162, but it pops up in the middle of the display.

How do I find the coordinates of the clicked ULV item to position the popup over it?
To know the position of an item (you can try by placing these lines in the ULV_ItemClick event):
B4X:
Dim Pnl As UltimateLVPanel = ULV.GetVisiblePanels(Position - ULV.GetFirstVisiblePosition)
Dim PositionOnScreen As Int = Pnl.Top + ULV.Top
 
Upvote 0
Top