Android Question CSBuilder ClickableWord Error

Discussion in 'Android Questions' started by Kiran Raotole, Oct 1, 2018.

  1. Kiran Raotole

    Kiran Raotole Active Member Licensed User

    In my, I'm using CustomListview and labels.
    on one label I clickable work like this :
    Code:
    Dim cs As CSBuilder
        cs.Initialize.Append(CreateClickableWord(
    "9225146803"))
        Label1.Text = cs
        cs.EnableClickEvents(Label1)
    Word click :
    Code:
    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


    Whats problem?
     
  2. Star-Dust

    Star-Dust Expert Licensed User

    Try adding PopAll to the end of the CSBuilder variable
     
  3. Kiran Raotole

    Kiran Raotole Active Member Licensed User

    Code:
    Sub CreateClickableWord(Text As StringAs 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.
     
  4. Kiran Raotole

    Kiran Raotole Active Member Licensed User

    Its added
     
  5. Star-Dust

    Star-Dust Expert Licensed User

    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
     
    Peter Simpson likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice