Hello,
Is really nice that the [B4X] [XUI] xCustomListView is included as an internal library but in my case I found some Cons, like some of my apps use an event
and to handle this event I use
Another thing that happened is that the PanelClickHandler has a bug that for some is minimum but for others like me it is a Cons.
The original PanelClickHandler is:
I tweak with :
And now the final question, is it possible to add the now internal library xCustomListView to our project and add a new module -> class module ->Custom view (XUI) and be part of the xCustomListView library? in this case but could be applied to other libraries like FireBase, etc..
I tried but does not work.
Or should I continue using the xCustomView as a module?
Well for the me moment I'm sure that I will, but if there is a nice solution, please let me know.
Is really nice that the [B4X] [XUI] xCustomListView is included as an internal library but in my case I found some Cons, like some of my apps use an event
B4X:
#Event: ItemLongClick (Index As Int, Value As Object)
B4X:
#If B4A
Private Sub Panel_LongClick
PanelLongClickHandler(Sender)
End Sub
#Else If B4i
Private Sub Panel_LongClick
PanelLongClickHandler(Sender)
End Sub
#Else If B4J
Private Sub Panel_MouseClicked (EventData As MouseEvent)
PanelLongClickHandler(Sender)
End Sub
#End If
Private Sub PanelLongClickHandler(SenderPanel As B4XView)
Dim clr As Int = GetItem(SenderPanel.Tag).Color
SenderPanel.SetColorAnimated(50, clr, PressedColor)
If xui.SubExists(CallBack, EventName & "_ItemLongClick", 2) Then
Sleep(100)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
CallSub3(CallBack, EventName & "_ItemLongClick", SenderPanel.Tag, GetItem(SenderPanel.Tag).Value)
End If
Sleep(100)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
End Sub
Another thing that happened is that the PanelClickHandler has a bug that for some is minimum but for others like me it is a Cons.
The original PanelClickHandler is:
B4X:
'Original Click Handler - [XUI] xCustomListView
Private Sub PanelClickHandler(SenderPanel As B4XView)
Dim clr As Int = GetItem(SenderPanel.Tag).Color
SenderPanel.SetColorAnimated(50, clr, PressedColor)
If xui.SubExists(CallBack, EventName & "_ItemClick", 2) Then
CallSub3(CallBack, EventName & "_ItemClick", SenderPanel.Tag, GetItem(SenderPanel.Tag).Value)
End If
Sleep(200)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
End Sub
I tweak with :
B4X:
Private Sub PanelClickHandler(SenderPanel As B4XView)
Dim clr As Int = GetItem(SenderPanel.Tag).Color
SenderPanel.SetColorAnimated(50, clr, PressedColor)
If xui.SubExists(CallBack, EventName & "_ItemClick", 2) Then
Sleep(100)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
CallSub3(CallBack, EventName & "_ItemClick", SenderPanel.Tag, GetItem(SenderPanel.Tag).Value)
End If
Sleep(100)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
End Sub
And now the final question, is it possible to add the now internal library xCustomListView to our project and add a new module -> class module ->Custom view (XUI) and be part of the xCustomListView library? in this case but could be applied to other libraries like FireBase, etc..
I tried but does not work.
Or should I continue using the xCustomView as a module?
Well for the me moment I'm sure that I will, but if there is a nice solution, please let me know.