Class RelativeLayout
Definition
- Assembly:
- Tizen.NUI.dll
RelativeLayout calculates the size and position of all the children based on their relationship to each other.
public class RelativeLayout : LayoutGroup, IDisposable, ILayoutParent
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceRelativeLayout()
Constructor
Declaration
public RelativeLayout()
Methods
View SourceGetBottomRelativeOffset(View)
Gets bottom relative offset.
Declaration
public static float GetBottomRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
float | The ratio between top and bottom of the Tizen.NUI.RelativeLayout.BottomTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetBottomTarget(BindableObject)
Gets bottom target object whose size and position is being used as reference.
Declaration
public static View GetBottomTarget(BindableObject view)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
View | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetFillHorizontal(View)
Gets the boolean value whether child fills its horizontal space.
Declaration
public static bool GetFillHorizontal(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
bool | True if to fill the space, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetFillVertical(View)
Gets the boolean value whether child fills its vertical space.
Declaration
public static bool GetFillVertical(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
bool | True if to fill the space, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetHorizontalAlignment(View)
Gets the horizontal alignment
Declaration
public static RelativeLayout.Alignment GetHorizontalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
RelativeLayout.Alignment | The horizontal alignment of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetLeftRelativeOffset(View)
Gets left relative offset.
Declaration
public static float GetLeftRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
float | The ratio between left and right of the Tizen.NUI.RelativeLayout.LeftTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetLeftTarget(BindableObject)
Gets left target object whose size and position is being used as reference.
Declaration
public static View GetLeftTarget(BindableObject view)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
View | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetRightRelativeOffset(View)
Gets right relative offset.
Declaration
public static float GetRightRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
float | The ratio between left and right of the Tizen.NUI.RelativeLayout.RightTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetRightTarget(BindableObject)
Gets right target object whose size and position is being used as reference.
Declaration
public static View GetRightTarget(BindableObject view)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
View | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetTopRelativeOffset(View)
Gets top relative offset.
Declaration
public static float GetTopRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
float | The ratio between top and bottom of the Tizen.NUI.RelativeLayout.TopTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetTopTarget(BindableObject)
Gets top target object whose size and position is being used as reference.
Declaration
public static View GetTopTarget(BindableObject view)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
View | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetVerticalAlignment(View)
Gets the vertical alignment
Declaration
public static RelativeLayout.Alignment GetVerticalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
RelativeLayout.Alignment | The vertical alignment of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
OnLayout(bool, LayoutLength, LayoutLength, LayoutLength, LayoutLength)
Called from Layout() when this layout should assign a size and position to each of its children.
Derived classes with children should override this method and call Layout() on each of their children.
Declaration
protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
Parameters
Type | Name | Description |
---|---|---|
bool | changed | This is a new size or position for this layout. |
LayoutLength | left | Left position, relative to parent. |
LayoutLength | top | Top position, relative to parent. |
LayoutLength | right | Right position, relative to parent. |
LayoutLength | bottom | Bottom position, relative to parent. |
Overrides
View SourceOnMeasure(MeasureSpecification, MeasureSpecification)
Measure the layout and its content to determine the measured width and the measured height.
If this method is overridden, it is the subclass's responsibility to make
sure the measured height and width are at least the layout's minimum height
and width.
Declaration
protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
MeasureSpecification | widthMeasureSpec | horizontal space requirements as imposed by the parent. |
MeasureSpecification | heightMeasureSpec | vertical space requirements as imposed by the parent. |
Overrides
View SourceSetBottomRelativeOffset(View, float)
Sets the relative offset for bottom target.
When value
is 0 the bottom edge of the view
is aligned to the top edge of the bottom target.
When value
is 1 the bottom edges of the bottom target and view
are aligned.
Declaration
public static void SetBottomRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
float | value | The ratio between left and right of the Tizen.NUI.RelativeLayout.BottomTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetBottomTarget(View, View)
Specifies the bottom side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
public static void SetBottomTarget(View view, View reference)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
View | reference | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetFillHorizontal(View, bool)
Sets the boolean value whether child fills its horizontal space.
Declaration
public static void SetFillHorizontal(View view, bool value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
bool | value | True if to fill the space, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetFillVertical(View, bool)
Sets the boolean value whether child fills its vertical space.
Declaration
public static void SetFillVertical(View view, bool value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
bool | value | True if to fill the space, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetHorizontalAlignment(View, Alignment)
Sets the horizontal alignment of this child view.
Declaration
public static void SetHorizontalAlignment(View view, RelativeLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
RelativeLayout.Alignment | value | The horizontal alignment of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetLeftRelativeOffset(View, float)
Sets the relative offset for left target.
When value
is 0 the left edges of the left target and view
are aligned.
When value
is 1 the left edge of the view
is aligned to the right edge of the left target.
Declaration
public static void SetLeftRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
float | value | The ratio between left and right of the Tizen.NUI.RelativeLayout.LeftTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetLeftTarget(View, View)
Specifies the left side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
public static void SetLeftTarget(View view, View reference)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
View | reference | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetRightRelativeOffset(View, float)
Sets the relative offset for right target.
When value
is 0 the right edge of the view
is aligned to the left edge of the right target.
When value
is 1 the right edges of the right target and view
are aligned.
Declaration
public static void SetRightRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
float | value | The ratio between left and right of the Tizen.NUI.RelativeLayout.RightTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetRightTarget(View, View)
Specifies the right side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
public static void SetRightTarget(View view, View reference)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
View | reference | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetTopRelativeOffset(View, float)
Sets the relative offset for top target.
When value
is 0 the top edges of the top target and view
are aligned.
When value
is 1 the top edge of the view
is aligned to the bottom edge of the top target.
Declaration
public static void SetTopRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
float | value | The ratio between left and right of the Tizen.NUI.RelativeLayout.TopTargetProperty. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetTopTarget(View, View)
Specifies the top side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
public static void SetTopTarget(View view, View reference)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
View | reference | The object whose size and position is being used as reference. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SetVerticalAlignment(View, Alignment)
Sets the vertical alignment of this child view.
Declaration
public static void SetVerticalAlignment(View view, RelativeLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
RelativeLayout.Alignment | value | The vertical alignment of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |