Android Question Embed Variables in a BBCodeView

Mahares

Expert
Licensed User
Longtime User
How can I make this work:
Code: Copy
Dim clr As Int=0xFFD21111
    BBCodeView1.Text = $"[Alignment=Center][TextSize=20]
    [color=${clr}][b]Home[/b]
    [FontAwesome=0xF015/]
    [/color][/TextSize][/Alignment]
    "$
Also, anther problem: if I move the FontAwesome line to the top of the BBCodeView, it does not display the icon.
Thank you
 
This code does not show the fontawesome icon. It only shows Home, no icon:
Post the BBCode and a screenshot.
Code: Copy
Dim clr As String="0xFFD21111"
    BBCodeView1.Text = $"[FontAwesome=0xF015/]
    [Alignment=Center][TextSize=20]
    [color=${clr}][b]Home[/b]
    [/color][/TextSize][/Alignment]
    "$
But I got it working when I place the fontawesome in the middle like this. It shows icon on top of text (Home):
Code: Copy
Dim clr As String="0xFFD21111"
    BBCodeView1.Text = $"
    [Alignment=Center][TextSize=20]
    [color=${clr}][b][FontAwesome=0xF015/]
    Home[/b]
    [/color][/TextSize][/Alignment]
    "$
 
Upvote 0
This is what I see when I run this code:

1599455939102.png


Code: Copy
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    TextEngine.Initialize(Activity)
    Dim clr As String="0xFFD21111"
    BBCodeView1.Text = $"[FontAwesome=0xF015/]
[Alignment=Center][TextSize=20]
[color=${clr}][b]Home[/b]
[/color][/TextSize][/Alignment]
    "$
End Sub
 
Upvote 0
This is odd, because I am running it on 2 different tablets and neither shows the fontawesome icon.. The layout has only the BBCodeView., no other views masking it. But even in your screenshot, why isn't the icon inside the BBCodeView
 
Upvote 0
Back
Top