Midimaster Active Member Licensed User Aug 27, 2020 #1 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: Copy 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:[email protected]"][email protected][/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?
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: Copy 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:[email protected]"][email protected][/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?
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2020 #2 Why are you building the string in such strange way? Why not: Code: Copy Dim s As String = $"Homepage: [url="https://www.20tracks.org"]www.20track.org[/url] E-Mail [url="mailto:[email protected]"][email protected][/url]"$ ??? Upvote 0
Why are you building the string in such strange way? Why not: Code: Copy Dim s As String = $"Homepage: [url="https://www.20tracks.org"]www.20track.org[/url] E-Mail [url="mailto:[email protected]"][email protected][/url]"$ ???
Midimaster Active Member Licensed User Aug 27, 2020 #3 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: Copy 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
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: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2020 #4 V1.83 is attached. Should fix this issue. It will be included in the next versions of B4X. Attachments BCTextEngine.b4xlib BCTextEngine.b4xlib 17.9 KB · Views: 464 Upvote 0
Midimaster Active Member Licensed User Aug 28, 2020 #5 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: Aug 28, 2020 Upvote 0
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?
Erel B4X founder Staff member Licensed User Longtime User Aug 28, 2020 #6 Midimaster said: Shouldnt we move the whole thread to the bug-forum, that others also can participate from your update? Click to expand... Not too important as soon the tools will be updated and the latest versions of all internal libraries will be included. Midimaster said: Where Do I put the BCTextEngine.b4xlib now? Click to expand... C:\Program Files (x86)\Anywhere Software\Basic4android\libraries Upvote 0
Midimaster said: Shouldnt we move the whole thread to the bug-forum, that others also can participate from your update? Click to expand... Not too important as soon the tools will be updated and the latest versions of all internal libraries will be included. Midimaster said: Where Do I put the BCTextEngine.b4xlib now? Click to expand... C:\Program Files (x86)\Anywhere Software\Basic4android\libraries