I am very new guy for Xamarin environment..
Previously I am working in Android. Android have Relative layout & Absolute layout (Deprecated so not used)
I have knowledge of Relative layout in android.
But In Xamarin layouts are totally confused me.. more than 2 days I am confused with Relative layout vs Absolute layouts..
Anyone give me what is difference between about these layouts...
I don`t need brief explanation.. Please give me some points about these layouts.. Thanks
RelativeLayout
It is used to position and size views relative to properties of the layout or sibling views. Unlike AbsoluteLayout, RelativeLayout does not have the concept of the moving anchor and does not have facilities for positioning elements relative to the bottom or right edges of the layout. RelativeLayout does support positioning elements outside of its own bounds.
Use RelativeLayout to create UIs that scale to fit any screen size.
RelativeLayout can be used to position views on screen relative to the overall layout or two other views.
Positioning and sizing a view within a RelativeLayout is done with constraints.
AbsoluteLayout
It positions and sizes child elements proportional to its own size and position or by absolute values. Child views may be positioned and sized using proportional values or static values, and proportional and static values can be mixed.
Use AbsoluteLayout to create pixel-perfect UIs.
Because of the positioning model of AbsoluteLayout, the layout makes it relatively straightforward to position elements so that they are flush with any side of the layout, or centered. With proportional sizes and positions, elements in an AbsoluteLayout can scale automatically to any view size. For items where only the position but not the size should scale, absolute and proportional values can be mixed.
AbsoluteLayout could be used anywhere elements need to be positioned within a view and is especially useful when aligning elements to edges.
AbsoluteLayout, like RelativeLayout, is able to position elements so that they overlap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With