xamarin/Xamarin.Forms

[Bug] AbsoluteLayout and RelativeLayout is expanding beyond its child Image

Aperta

#6177 aperta il 12 mag 2019

 (2 commenti) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/layoute/6 :clock6:help wantedt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

  • Version with issue: Xamarin.Forms-pre10
  • IDE:Visual Studio for Mac
  • Affected Devices:iOS and Android.

Reproduction Link

LayoutSizeRepro.zip

Guida contributor