Android Question BBCodeView_LinkClicked event not rising

Hello, I'm using [B4X] Cross platform chat layout example Written by Erel for my chat app. I've changed the "BuildMessage" as below,

B4X: Copy
Private Sub BuildMessage (Text As Object, User As String,timeX As String) As String
    Dim output As String
    output=$"[Alignment=Left][b]${User}[/b]${CRLF}${Text}[url="https://www.b4x.com"] Link [/url]${CRLF}[color=#787878][TextSize=10]${DateTime.Time(timeX)}[/TextSize][/color][/Alignment]"$
    Return output
End Sub

The problem is that BBCodeView1_LinkClicked (URL As String) event is not rising when I clicked the link of BBCodeView.

Can anyone help me to solve this issue?
 
1. timeX should be Long.
2. I've tested it with this code and it worked:
Code: Copy
BBCodeView1.Text = BuildMessage("text", "erel", DateTime.Now)
End Sub

Private Sub BuildMessage (Text As Object, User As String,timeX As Long) As String
    Dim output As String
    output=$"[Alignment=Left][b]${User}[/b]${CRLF}${Text}[url="https://www.b4x.com"] Link [/url]${CRLF}[color=#787878][TextSize=10]${DateTime.Time(timeX)}[/TextSize][/color][/Alignment]"$
    Return output
End Sub

Sub BBCodeView1_LinkClicked (URL As String)
    Log(URL)
End Sub
 
Upvote 0
Back
Top