Hello Erel,
I've been using the XCustomListView for quite some time now, I personally don't like using the standard click event for selecting rows, actually I've added a LongClick event as it's to easy for my clients to accidentally tap on the screen when using their bespoke apps.
Every time you update the class (which is currently on v1.64) I download and add the class to my shared folder. I've added the LongClick event to the class and I have to keep updating it whenever I update the class. I presume that other developers and their clients would find the LongClick event useful like my clients do when selecting a row/panel etc.
Would you consider adding the following LOC to the XCustomListView class as standard, thus other developers could either use Click or LongClick event.
I've just added the extra code underneath the Click subs that are already in the class for neatness.
Thank you...
I've been using the XCustomListView for quite some time now, I personally don't like using the standard click event for selecting rows, actually I've added a LongClick event as it's to easy for my clients to accidentally tap on the screen when using their bespoke apps.
Every time you update the class (which is currently on v1.64) I download and add the class to my shared folder. I've added the LongClick event to the class and I have to keep updating it whenever I update the class. I presume that other developers and their clients would find the LongClick event useful like my clients do when selecting a row/panel etc.
Would you consider adding the following LOC to the XCustomListView class as standard, thus other developers could either use Click or LongClick event.
I've just added the extra code underneath the Click subs that are already in the class for neatness.
B4X:
#Event: ItemLongClick (Index As Int, Value As Object)
'-------------------------------------------------------------
'In the main class code
Private Sub PanelLongClickHandler(SenderPanel As B4XView)
Dim clr As Int = GetRawListItem(SenderPanel.Tag).Color
SenderPanel.SetColorAnimated(50, clr, PressedColor)
If xui.SubExists(CallBack, EventName & "_ItemLongClick", 2) Then
CallSub3(CallBack, EventName & "_ItemLongClick", SenderPanel.Tag, GetRawListItem(SenderPanel.Tag).Value)
End If
Sleep(200)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
End Sub
#If B4A
Private Sub Panel_LongClick
PanelLongClickHandler(Sender)
End Sub
#else If B4i.....
Private Sub Panel_LongClick
PanelLongClickHandler(Sender)
End Sub
Private Sub Panel_MouseLongClicked (EventData As MouseEvent)
PanelLongClickHandler(Sender)
End Sub
Thank you...