Android Question BBCodeView wrong position for underline on a URL

Midimaster

Active Member
Licensed User
Hi, I use BBCodeView in combination with BCTextEngine. It is awesome for my "About..."-Screen.

But now I tried to add a text line with an URL and an E-Mail-Adress and now I can see strange behaviors:

Screenshot of Galaxy S10

As you see, the lines of the URs are above the adresses. (The link works still perfect and forwards to the homepage.)

This is my code:

B4X:
Sub Globals
    Dim AboutLabel As BBCodeView
    Private TextEngine As BCTextEngine
End Sub

Sub ShowAbout
    Dim t ,v As String
    v= $"[url="https://www.20tracks.org"]www.20track.org[/url]"$
    t= "[vertical=30]"  & "Homepage =  " & v & CRLF& CRLF

    v= $"[url="mailto:info@20tracks.org"]info@20tracks.org[/url]"$
    t=t  & "E-Mail " & v & CRLF& CRLF

    t=t  & "[/vertical]" & CRLF & CRLF
    AboutLabel.Text=t
End Sub

Sub Aboutlabel_LinkClicked (URL As String)
    Dim p As PhoneIntents
    StartActivity(p.OpenBrowser( URL))
End Sub

As long as I do not use the tag [vertical=30] the lines are below the text.

Is this a bug?
 

Midimaster

Active Member
Licensed User
I think, this does not explain the strange behavoir, or? Is my way wrong and causing the problem?

There was a reason for this code: In the real code the string is very much longer and build by a lot of function calls. I have written (isolated) the lines above only for demonstrating the behavoir here.

By the way I'm not a friend of "code line monsters".

The original code looks like this, but this would explain (help) nothing here:

B4X:
Sub ShowAbout
    Dim all As String
    for i=0 to MaxLines-1
        all= all & ReadLineTopic(i) & " = "  & ReadLineValue(i) & ReadLineEnding(i)
    next
    AboutLabel.Text=all
End Sub
 
Upvote 0

Midimaster

Active Member
Licensed User
Thank you so much. The service here is outstanding. I did not expect an update that fast! Shouldnt we move the whole thread to the bug-forum, that others also can participate from your update?

I will send some money for contribution...

a last qeustion...

Where Do I put the BCTextEngine.b4xlib now?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Shouldnt we move the whole thread to the bug-forum, that others also can participate from your update?
Not too important as soon the tools will be updated and the latest versions of all internal libraries will be included.

Where Do I put the BCTextEngine.b4xlib now?
C:\Program Files (x86)\Anywhere Software\Basic4android\libraries
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…