I have an Image control that I'm using on Android and iOS. In iOS the image appears with the correct orientation. On Android is displays sideways. The Image's source is bound to a property that returns a URL of the image's location.
Here is the code for the Image in Xaml:
<RelativeLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Image x:Name="curImage" Aspect="AspectFill" VerticalOptions="FillAndExpand" Source="{Binding ImageLink}"
RelativeLayout.XConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0,
Constant=0}"
RelativeLayout.WidthConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=1,
Constant=0}"
RelativeLayout.HeightConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=1,
Constant=0}">
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{DynamicResource vmViewPoll}" CommandParameter="{Binding Id}" />
</Image.GestureRecognizers>
</Image>
<controls:ExtendedLabel Text="{Binding Question}" HeightRequest="75" LineBreakMode="WordWrap" TextColor="White" Font="Bold" BackgroundColor="#98434342"
RelativeLayout.WidthConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=1,
Constant=0}"
RelativeLayout.XConstraint=
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint=
"{ConstraintExpression Type=RelativeToView,
ElementName=curImage,
Property=Height,
Factor=1,
Constant=-75}" />
</RelativeLayout>
I have attached screenshots of how it renders in Android and iOS. Is this a bug, known issue or am I simply doing something wrong?
Thanks!!!