Android Question xCLVitem added to listview with an object AND CLVSwipe object

mscientist33

Active Member
Licensed User
I have a xCLV that I am adding items to by the way of:

B4X:
mxCLV.Add(CreateItem(iv), iv)

Whereas the iv is a type created for a B4Xview

B4X:
Sub CreateItem(iv As ivvalues) As B4XView
    
    Dim p As B4XView = Starter.xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, mxCLV.asview.Width, 60dip)
    p.LoadLayout("mCLVlayout")

    lblText.Text = iv.lblText
    lblcmd.Text = iv.lblcmd
    
    Return p
End Sub

That being said, I am using the mxCLV.Add comman which takes the B4XView and an object which in my case is the iv type object. I also want to add a CLVSwipe object. How can I add a swipe object to an item that already has an object?
 

mscientist33

Active Member
Licensed User
I figured it out. For others with the same question, I used:

B4X:
mxCLV.Add(CreateItem(iv),Swipe.CreateItemValue(iv, Array("Remove")))
 
Upvote 0
Top