Class RelativeLayout
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 9
RelativeLayout calculates the size and position of all the children based on their relationship to each other.
C#Copypublic class RelativeLayout : LayoutGroup, ILayoutParent
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic RelativeLayout()
API Level: 9
Fields
Declaration
C#Copypublic static readonly BindableProperty BottomRelativeOffsetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty BottomTargetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty FillHorizontalProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty FillVerticalProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty HorizontalAlignmentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty LeftRelativeOffsetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty LeftTargetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty RightRelativeOffsetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty RightTargetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty TopRelativeOffsetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty TopTargetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty VerticalAlignmentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Methods
Declaration
C#Copypublic static float GetBottomRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
Single | The ratio between top and bottom of the BottomTargetProperty. |
API Level: 9
GetBottomTarget(BindableObject)
Gets bottom target object whose size and position is being used as reference.
Declaration
C#Copypublic 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. |
API Level: 9
GetFillHorizontal(View)
Gets the boolean value whether child fills its horizontal space.
Declaration
C#Copypublic static bool GetFillHorizontal(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Boolean | True if to fill the space, false otherwise. |
API Level: 9
Declaration
C#Copypublic static bool GetFillVertical(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Boolean | True if to fill the space, false otherwise. |
API Level: 9
Declaration
C#Copypublic static RelativeLayout.Alignment GetHorizontalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
RelativeLayout.Alignment | The horizontal alignment of |
API Level: 9
Declaration
C#Copypublic static float GetLeftRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
Single | The ratio between left and right of the LeftTargetProperty. |
API Level: 9
GetLeftTarget(BindableObject)
Gets left target object whose size and position is being used as reference.
Declaration
C#Copypublic 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. |
API Level: 9
Declaration
C#Copypublic static float GetRightRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
Single | The ratio between left and right of the RightTargetProperty. |
API Level: 9
GetRightTarget(BindableObject)
Gets right target object whose size and position is being used as reference.
Declaration
C#Copypublic 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. |
API Level: 9
Declaration
C#Copypublic static float GetTopRelativeOffset(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Returns
Type | Description |
---|---|
Single | The ratio between top and bottom of the TopTargetProperty. |
API Level: 9
GetTopTarget(BindableObject)
Gets top target object whose size and position is being used as reference.
Declaration
C#Copypublic 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. |
API Level: 9
Declaration
C#Copypublic static RelativeLayout.Alignment GetVerticalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
RelativeLayout.Alignment | The vertical alignment of |
API Level: 9
OnLayout(Boolean, 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
C#Copyprotected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
Parameters
Type | Name | Description |
---|---|---|
Boolean | 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
API Level: 9
OnMeasure(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
C#Copyprotected 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
API Level: 9
SetBottomRelativeOffset(View, Single)
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
C#Copypublic static void SetBottomRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Single | value | The ratio between left and right of the BottomTargetProperty. |
API Level: 9
SetBottomTarget(View, View)
Specifies the bottom side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
C#Copypublic 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. |
API Level: 9
SetFillHorizontal(View, Boolean)
Sets the boolean value whether child fills its horizontal space.
Declaration
C#Copypublic static void SetFillHorizontal(View view, bool value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Boolean | value | True if to fill the space, false otherwise. |
API Level: 9
SetFillVertical(View, Boolean)
Sets the boolean value whether child fills its vertical space.
Declaration
C#Copypublic static void SetFillVertical(View view, bool value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Boolean | value | True if to fill the space, false otherwise. |
API Level: 9
SetHorizontalAlignment(View, RelativeLayout.Alignment)
Sets the horizontal alignment of this child view.
Declaration
C#Copypublic static void SetHorizontalAlignment(View view, RelativeLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
RelativeLayout.Alignment | value | The horizontal alignment of |
API Level: 9
SetLeftRelativeOffset(View, Single)
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
C#Copypublic static void SetLeftRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Single | value | The ratio between left and right of the LeftTargetProperty. |
API Level: 9
SetLeftTarget(View, View)
Specifies the left side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
C#Copypublic 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. |
API Level: 9
SetRightRelativeOffset(View, Single)
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
C#Copypublic static void SetRightRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Single | value | The ratio between left and right of the RightTargetProperty. |
API Level: 9
SetRightTarget(View, View)
Specifies the right side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
C#Copypublic 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. |
API Level: 9
SetTopRelativeOffset(View, Single)
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
C#Copypublic static void SetTopRelativeOffset(View view, float value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view whose size and position is being changed. |
Single | value | The ratio between left and right of the TopTargetProperty. |
API Level: 9
SetTopTarget(View, View)
Specifies the top side edge of the child view relative to the target view.
null reference
means parent relative layout.
Declaration
C#Copypublic 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. |
API Level: 9
SetVerticalAlignment(View, RelativeLayout.Alignment)
Sets the vertical alignment of this child view.
Declaration
C#Copypublic static void SetVerticalAlignment(View view, RelativeLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
RelativeLayout.Alignment | value | The vertical alignment of |