This works perfect in B4A, but in B4I -- It causes the FontAwesome assigned label to show "61956" -- The decimal version of the hex sent to Chr().
I did a unit test to see what exactly is going on:
B4X:
Dim result As Object = IIf(enabled_guidelines, Chr(0xf205), Chr(0xf204))
Log("IIF object type: " & GetType(result) & " " & result)
Log("NON object type: " & GetType(Chr(0xf205)) & " " & Chr(0xf205))
The workaround was:
B4X:
If(enabled_guidelines) Then
settings_toggle_guidelines.Text = Chr(0xf205)
Else
settings_toggle_guidelines.Text = Chr(0xf204)
End If
If(enabled_levelindicator) Then
settings_toggle_levelindicator.Text = Chr(0xf205)
Else
settings_toggle_levelindicator.Text = Chr(0xf204)
End If
If(enabled_templatestencil) Then
settings_toggle_templatestencil.Text = Chr(0xf205)
Else
settings_toggle_templatestencil.Text = Chr(0xf204)
End If