Bug? Arabic text is being cuted in ListVew

Pavka

Member
Licensed User
Longtime User
Arabic text which is being written from right to left is cuted at the right side of a ListView.
I use an AHLocale lib to make translations to my app. I encountered a problem with Arabic language text which is being cuted in ListVew at the right side. A ListView.width=100%x, I even tried to make it 90%x but it did not helped anyway. So, it seems to be a problem with ListView.
Actually, I solved the problem by adding 15 spaces before each string, but anyway I'd like to know if I did something wrong or something is realy wrong with ListView?
 
Can you post a screenshot of the text (without the spaces)?
Here are 2 screenshots: one - of the .lng file, and the other - from the device. One string is with spaces and the other - without.
 

Attachments

  • text2.jpg
    text2.jpg
    34.9 KB · Views: 528
  • Screenshot1.jpg
    Screenshot1.jpg
    26.6 KB · Views: 497
أجدادنا القدماء كانوا يلبسون الجلود ويسافرون بالجمال والحمير والحصين

Can you use the above sentence in the list view (without spaces)?
 
OK, in this project there is nothing except the ListView with a single TwoLinesAndBitmap item with Arabic text.
 

Attachments

أجدادنا القدماء كانوا يلبسون الجلود ويسافرون بالجمال والحمير والحصين

Can you use the above sentence in the list view (without spaces)?
Sure, the sentence is quite long, so it is better to use the landscape orientation of your device
 

Attachments

The problem is not only with arabic texts but with all texts and is caused by a wrong width of the Labels.
The Label widths are set to -1 which means fill the parent view the parent view is the ListView.
You should add these lines:
Code: Copy
ListView1.TwoLinesAndBitmap.Label.Width = ListView1.Width - ListView1.TwoLinesAndBitmap.Label.Left
ListView1.TwoLinesAndBitmap.SecondLabel.Width = ListView1.Width - ListView1.TwoLinesAndBitmap.SecondLabel.Left
Attached your modified test project.
 

Attachments

Back
Top