Android Question Chat

aeric

Expert
Licensed User
Longtime User
I tried use this example
https://www.b4x.com/android/forum/threads/106207/#content

But arabic text is not displayed correctly
How do I make the application accept the Arabic language
Can anyone help?

arabic text is not displayed correctly
What's wrong?

Here is my test:
B4X:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private TextEngine As BCTextEngine
    Private BBLabel1 As BBLabel
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    TextEngine.Initialize(Root)
    BBLabel1.TextEngine = TextEngine
    BBLabel1.RTL = True
    ' RTL DIV: https://istizada.com/arabic-lorem-ipsum/
    BBLabel1.Text = $"[direction=ltr]Test-<[/direction]إما أن يرفض مصادر السعادة من أجل ما هو أكثر أهمية أو يتحمل الألم من أجل ألا يتحمل ما هو أسو. قب أليمة أو آخر أراد أن يتجنب الألم الذ."$
End Sub
 
Upvote 0
Top