If you use the ItemClick event to open another activity, the color of SenderPanel changes to PressedColor and The activity opens, but when second activity closes and the app returns to first Activity, the Item is still with the PressedColor.
This is the code In xCustomListView:
So, aparently if the Activity is changed, the second SetColorAnimated is never executed.
Any idea on how to fix this?
Workaround: add a sleep in the ItemClick to allow the animation to end before start the new Activity.
This is the code In xCustomListView:
B4X:
Private Sub PanelClickHandler(SenderPanel As B4XView)
Dim clr As Int = GetRawListItem(SenderPanel.Tag).Color
SenderPanel.SetColorAnimated(50, clr, PressedColor)
If xui.SubExists(CallBack, EventName & "_ItemClick", 2) Then
CallSub3(CallBack, EventName & "_ItemClick", SenderPanel.Tag, GetRawListItem(SenderPanel.Tag).Value)
End If
Sleep(200)
SenderPanel.SetColorAnimated(200, PressedColor, clr)
End Sub
So, aparently if the Activity is changed, the second SetColorAnimated is never executed.
Any idea on how to fix this?
Workaround: add a sleep in the ItemClick to allow the animation to end before start the new Activity.
Last edited: