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] AbsoluteLayout and RelativeLayout is expanding beyond its child Image #6177

Open HobDev opened 5 years ago

HobDev commented 5 years ago

Description

I need to display some controls on an Image. So, I need to put image inside RelativeLayout or AbsoluteLayout. But both of these layouts expand beyond the Image. This causes wastage of space. RelativeLayout is taking even more space than AbsoluteLayout. These Layout should adapt according to the size of its children. Exactly as StackLayout.

Steps to Reproduce

Swap RelativeLayout and AbsoluteLayout in my repro project.

Basic Information

Reproduction Link

LayoutSizeRepro.zip

HobDev commented 5 years ago

I am not sure but #5767 may be somehow related. The behaviour is different in both issues. But both issues are related to the sizing of AbsoluteLayout and RelativeLayout

HobDev commented 5 years ago

Any updates when this will be fixed. Making AbsoluteLayout and RelativeLayout Adaptable is very important for adaptive design which can scale according to the device size. At this movement I need to give these Layouts a fixed size.