Android Question customlistview showing popupmenu

Addo

Well-Known Member
Licensed User
Longtime User
i can see how to copy using clipboard library in on itemclick event by using copyclip.setText(value)
but i cannot figureout how to implment list like that and when click on copy it should copy the text of the itemclick value
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
thats how i figure out a way but the position is offest how could i make the listview position is set to the customview item click position ?

B4X:
Dim popupcopy As ListView
popupcopy.Initialize("popupcopy")
popupcopy.AddSingleLine("Copy")
Activity.AddView(popupcopy, 0, 0, 30%x, 30%y)


Sub lstvv_ItemClick (Index As Int, Value As Object)
    
If popupcopy.Visible = True Then
popupcopy.Visible = False
else If popupcopy.Visible = False Then
popupcopy.Visible = True
End If

    
End Sub
 
Upvote 0

udg

Expert
Licensed User
Longtime User
My understandig is that the OP wants to use a ListView to create a pop-up menu (sporting a single command, i.e. Copy) but he wants the pop-up to be aligned with the CLV item just clicked.
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
also customlistview library does not have
ScrollViewOffsetY property and GetBase.Top

and parent.top is not defined i used Top

i tried to do this

B4X:
popupcopy.top = lstvv.GetPanel(Index).Top

but it does not placed near the item clicked its placed on the very top of the activity
 
Last edited:
Upvote 0
Top