xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] iOS RadioButton alignment in RTL #11324

Open Cloudtrackers opened 4 years ago

Cloudtrackers commented 4 years ago

Description

If FlowDirection (RTL or LTR) it is always aligned in the left. it happens only in iOS.

Steps to Reproduce

  1. HorizontalOptions is "FillAndExpand"
  2. FlowDirection is RightToLeft
  3. and the Text is Arabic

Expected Behavior

In RTL Mode, RadioButton should be start from the right.

Actual Behavior

In both mode (RTL or LTR), Always start from left

Basic Information

Screenshots

Screen Shot 2020-07-06 at 12 30 05 PM Screen Shot 2020-07-06 at 12 30 05 PM

Reproduction Link

Workaround

jsuarezruiz commented 4 years ago

Can reproduce the issue. Attach a reproduction sample: Issue11324.zip

PureWeen commented 3 years ago

Android also appears to be problematic as well https://github.com/xamarin/Xamarin.Forms/issues/12440

hamiddd1980 commented 3 years ago

Hi. I found out that the Radiobutton (without applying Control Template) is Displayed correctly in Right To Left mode in Android by Enabling android:supportsRtl="true" . but the problem still exists when a Control Template is applied to the View in RightToLeft Mode in Android and iOS.(following pictures) also in iOS , the Text and Radiobutton overlaps. Thanks. Radiobutton in RightToLeft Mode in iOS with applied ControlTemplate: RadiobuttonTemplate

Radiobutton in RightToLeft Mode in Android with applied ControlTemplate: CompareLRwithTemplate

hartez commented 3 years ago

PR #12742 partially addresses this - it gets the FlowDirection applying to the RadioButton. The default template still has an issue, though; it always places the content to the right of the button itself, so applying RTL is pushing the content off the edge of the container.