I use the following code with its own font. I always have the problem if I use a continuous text (without line break) and it breaks in the wrong place.
It usually writes a word that is no longer completely displayed in the line. (see picture - where BBCodeView1 is on a white background).
BBCodeView1 ends where it is cut off.
See picture.
regards Frank
B4X:
TextEngine.Initialize(Activity)
TextEngine.TagParser.UrlColor = xui.Color_White
BBCodeView1.ParseData.DefaultFont = xui.CreateFont(myFont,14)
BBCodeView1.Text = Text
I think I see the problem. I'm downloading the texts from a website. The control will probably be resized after the text has been transferred. The text is not reformatted again (as I thought)
The example shows the 'problem'
1. Use File - Export as zip when uploading projects.
2. Correct code:
B4X:
Sub Button1_Click
BBCodeView1.mBase.Width = BBCodeView1.mBase.Width - 20dip
If xui.IsB4A Then
BBCodeView1.Base_Resize(BBCodeView1.mBase.Width, BBCodeView1.mBase.Height)
End If
End Sub
It is only needed in B4A as it will happen automatically in B4J and B4i.
If you get an error that Base_Resize is missing then update to latest version of BCTextEngine.