In my, I'm using CustomListview and labels.
on one label I clickable work like this :
B4X:
Dim cs As CSBuilder
cs.Initialize.Append(CreateClickableWord("9225146803"))
Label1.Text = cs
cs.EnableClickEvents(Label1)
Word click :
B4X:
Sub Word_Click (Tag As Object)
Log("aaaaaa" & Tag)
End Sub
It shows error Log:
customlistview_getitemfromview (java line: 430)
java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.View
Sub CreateClickableWord(Text As String) As CSBuilder
Dim cs As CSBuilder
Return cs.Initialize.Underline.Color(0xFF00D0FF).Clickable("word", Text).Append(Text).PopAll
End Sub
I create this function for that clickable command.
It shows error Log:
customlistview_getitemfromview (java line: 430)
java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.View
these errors indicate that you are trying to cast a CustomView with a standard view.
You have to look for the error somewhere else, not in the CSBuilder