-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] RelativeLayout doesn't lay out (position) child views correctly in horizontal direction when Flowdirection is Right To Left #11637
Comments
Hi.
in the above code , when View is RightToLeft , it is mirrored to the right side of page in line 142. |
<RelativeLayout Margin="20">
<Label Background="Green" WidthRequest="70" HeightRequest="70" x:Name="Source" Text="Source" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="White"
RelativeLayout.XConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint ="{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0.3,
Constant=0}" />
<Label x:Name="TargetBox" WidthRequest="70" HeightRequest="70" BackgroundColor="Red" Text="Target" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="White"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView,
ElementName=Source,
Property=X,
Constant=0}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView,
ElementName=Source,
Property=Y,
Constant=200}"/>
</RelativeLayout> |
Hi, according to the fact that the Root of this problem is Known and Discovered (as I pointed to it in above Comments) ,so why have you moved this problem from Ready For Work to Needs Estimate ? |
Hello. I'd like to thank you for considering the matter. According to the fact that I pointed to the possible root of problem in my comments( in Github) , I'd like to know is it possible to accelerate solving this Bug?
Thank you for taking this into consideration.
…________________________________
From: Shane Neuville <notifications@github.com>
Sent: Thursday, August 6, 2020 3:42 AM
To: xamarin/Xamarin.Forms <Xamarin.Forms@noreply.github.com>
Cc: hamiddd1980 <hamid_life@live.com>; Author <author@noreply.github.com>
Subject: Re: [xamarin/Xamarin.Forms] [Bug] RelativeLayout doesn't lay out (position) child views correctly in horizontal direction when Flowdirection is Right To Left (#11637)
<RelativeLayout Margin="20">
<Label Background="Green" WidthRequest="70" HeightRequest="70" x:Name="Source" Text="Source" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="White"
RelativeLayout.XConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint ="{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0.3,
Constant=0}" />
<Label x:Name="TargetBox" WidthRequest="70" HeightRequest="70" BackgroundColor="Red" Text="Target" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="White"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView,
ElementName=Source,
Property=X,
Constant=0}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView,
ElementName=Source,
Property=Y,
Constant=200}"/>
</RelativeLayout>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#11637 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANTK63ZIYAH6SQBJ5UWABKDR7HROHANCNFSM4PTAG7LQ>.
|
Description
When Page FlowDirection is RightToLeft , RelativeLayout doesn't arrange (position) it's child views correctly in Horizontal axis(direction) in case Relative type of view is RelativeToView. (I mean the View is positioned relative to other view , not the parent)
Steps to Reproduce
<ContentPage FlowDirection="RightToLeft"></ContentPage >
Expected Behavior
the two Views must appears at the same place(Coordinate , position) Horizontally. (because the second view XConstraint is Bound to the first view X property)
Actual Behavior
the second view appears in different position toward to the first view in Horizontal axis.(in fact it's positioned at left side of page)(following Picture)
Basic Information
Screenshots
Reproduction Link
Workaround
The text was updated successfully, but these errors were encountered: