Android Question ULV ItemLongClick not responding to long clicks

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

Anyone using the ULV, can you look at my code and tell me what I did wrong because ItemLongClicks are not responding to me doing a long click.

This code is in Activity_Create

B4X:
    ' Initialize the ULV.
    '--------------------
    ULV.Initialize(0, 0, "", "Students_ULV")
    ULV.DividerHeight = 0
    ULV.SetStyle(ULV.STYLE_HOLO_LIGHT)
    ULV.SelectionMode = ULV.SELECTION_SINGLE
    ULV.AddRowLayout("VIEW", "View_RowLayoutCreator", "View_RowContentFiller", _
        60dip, 2, Widths, DividerWidth, Colors.Gray, True)
  
    Activity.AddView(ULV, 0, HeaderHeight, 100%x, 70%y - HeaderHeight)

B4X:
Sub Students_ULV_ItemLongClick(ItemID As Long, Position As Int, ClickedPanel As Panel)
  
    ClickedPanel.Color = Colors.ARGB(220, 51, 181, 229) 'Holo blue
End Sub
 

rleiman

Well-Known Member
Licensed User
Longtime User
This method works :
B4X:
Sub Students_ULV_CellLongClick(RowID As Long, CellIndex As Byte, Position As Int, ClickedPanel As Panel)
Strange. I wonder why CellLongClick works but not ItemLongClick.

Anyway, at least it turns the cell blue. Is there a way to get all the cells on the clicked row to be blue?
 
Upvote 0

jinxaw

Member
Licensed User
Longtime User
Strange. I wonder why CellLongClick works but not ItemLongClick.

Anyway, at least it turns the cell blue. Is there a way to get all the cells on the clicked row to be blue?

I would be very interested in an answer to the row question. I have a similar problem and i would like to color the whole row i selected.
Thank you very much!

Best regards,
Daniel
 
Upvote 0
Top