Xamarin.forms: [Bug] IOS Label text alignment in RTL

Created on 30 Dec 2019  路  10Comments  路  Source: xamarin/Xamarin.Forms

Description

In RTL , Label text alignment is left only in iOS, it's working fine in android.

Steps to Reproduce

if the Label

  1. HorizontalOptions is "FillAndExpand"
  2. HorizontalTextAlignment is "Start"
  3. And FlowDirection is RTL

Expected Behavior

Text alignment should be align from Right.

Actual Behavior

Text is aligned left.

Basic Information

  • Version with issue: Xamarin.Forms 4.4.0.991265
  • Last known good version: Xamarin.Forms 4.2.0.910310
  • IDE: Visual Studio Community 2019 for Mac
    Version 8.3.11 (build 1)
  • Platform Target Frameworks:

    • iOS: iOS: 13.3
    • Android: Android: 9
  • Affected Devices: iOS Devices

Screenshots

Screen Shot 2019-12-30 at 8 59 11 AM

4.2.0 rtl 3 hackathon regression in-progress iOS 馃崕 bug

Most helpful comment

@Cloudtrackers @AmrAlSayed0 Here is a workaround with custom label renderer while I'm preparing PR
RtlLabelIosBug.zip

All 10 comments

Yes, I am also having this issue. It happens only when the label has Arabic text AND the device locale is a non-RTL locale like English AND the label has multi line text. Single line labels are correctly displayed on iOS.

Minimum reproduction repo.
If:
Device locale or App local is English (and probably any other LTR locale)
And
The Label HorizontalTextAlignment is Start and FlowDirection is RTL
And
Label text is Arabic and long enough to be multiple lines
this bug happens
RtlLabelIosBug.zip

This bug happens after the released version of Xamarin.Forms(4.2.0.910310).

Now going to release Xamarin Forms 4.5 (three breaking releases). still the bug is open.

At the end of April 2020 apple development community going to stop accepting submissions of apps that use UIWebView APIs . in the Xamarin Forms 4.5 resolving this issue, but we can't upgrade to Xamarin Forms 4.5 because still the Arabic misalignment bug is open. Now my app developmental process is going to be source stopping stage. When can we expect the resolution ??

@Cloudtrackers @AmrAlSayed0 I have a solution. I will do some more checks and will submit PR today

RTLFix

@Cloudtrackers @AmrAlSayed0 Here is a workaround with custom label renderer while I'm preparing PR
RtlLabelIosBug.zip

This bug is still there, I'm using Xamarin.Forms 4.5.0.530

@darrabam Fix has not been reviewed and merged yet

This should be fixed!

Was this page helpful?
0 / 5 - 0 ratings