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#
Copy
public class RelativeLayout : LayoutGroup, IDisposable, ILayoutParent
Inheritance
System.Object
RelativeLayout
Implements
System.IDisposable

Constructors

View Source

RelativeLayout()

Constructor

Declaration
C#
Copy
public RelativeLayout()
API Level: 9

Methods

View Source

GetBottomRelativeOffset(View)

Gets bottom relative offset.

Declaration
C#
Copy
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
System.Single

The ratio between top and bottom of the Tizen.NUI.RelativeLayout.BottomTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetBottomTarget(BindableObject)

Gets bottom target object whose size and position is being used as reference.

Declaration
C#
Copy
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 view cannot be null.

API Level: 9
View Source

GetFillHorizontal(View)

Gets the boolean value whether child fills its horizontal space.

Declaration
C#
Copy
public 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.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetFillVertical(View)

Gets the boolean value whether child fills its vertical space.

Declaration
C#
Copy
public 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.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetHorizontalAlignment(View)

Gets the horizontal alignment

Declaration
C#
Copy
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 view.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetLeftRelativeOffset(View)

Gets left relative offset.

Declaration
C#
Copy
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
System.Single

The ratio between left and right of the Tizen.NUI.RelativeLayout.LeftTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetLeftTarget(BindableObject)

Gets left target object whose size and position is being used as reference.

Declaration
C#
Copy
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 view cannot be null.

API Level: 9
View Source

GetRightRelativeOffset(View)

Gets right relative offset.

Declaration
C#
Copy
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
System.Single

The ratio between left and right of the Tizen.NUI.RelativeLayout.RightTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetRightTarget(BindableObject)

Gets right target object whose size and position is being used as reference.

Declaration
C#
Copy
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 view cannot be null.

API Level: 9
View Source

GetTopRelativeOffset(View)

Gets top relative offset.

Declaration
C#
Copy
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
System.Single

The ratio between top and bottom of the Tizen.NUI.RelativeLayout.TopTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

GetTopTarget(BindableObject)

Gets top target object whose size and position is being used as reference.

Declaration
C#
Copy
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 view cannot be null.

API Level: 9
View Source

GetVerticalAlignment(View)

Gets the vertical alignment

Declaration
C#
Copy
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 view.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
protected 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
View Source

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#
Copy
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
API Level: 9
View Source

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#
Copy
public static void SetBottomRelativeOffset(View view, float value)
Parameters
Type Name Description
View view

The child view whose size and position is being changed.

System.Single value

The ratio between left and right of the Tizen.NUI.RelativeLayout.BottomTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
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 view cannot be null.

API Level: 9
View Source

SetFillHorizontal(View, Boolean)

Sets the boolean value whether child fills its horizontal space.

Declaration
C#
Copy
public 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.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

SetFillVertical(View, Boolean)

Sets the boolean value whether child fills its vertical space.

Declaration
C#
Copy
public 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.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

SetHorizontalAlignment(View, RelativeLayout.Alignment)

Sets the horizontal alignment of this child view.

Declaration
C#
Copy
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 view.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
public static void SetLeftRelativeOffset(View view, float value)
Parameters
Type Name Description
View view

The child view whose size and position is being changed.

System.Single value

The ratio between left and right of the Tizen.NUI.RelativeLayout.LeftTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
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 view cannot be null.

API Level: 9
View Source

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#
Copy
public static void SetRightRelativeOffset(View view, float value)
Parameters
Type Name Description
View view

The child view whose size and position is being changed.

System.Single value

The ratio between left and right of the Tizen.NUI.RelativeLayout.RightTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
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 view cannot be null.

API Level: 9
View Source

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#
Copy
public static void SetTopRelativeOffset(View view, float value)
Parameters
Type Name Description
View view

The child view whose size and position is being changed.

System.Single value

The ratio between left and right of the Tizen.NUI.RelativeLayout.TopTargetProperty.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9
View Source

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#
Copy
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 view cannot be null.

API Level: 9
View Source

SetVerticalAlignment(View, RelativeLayout.Alignment)

Sets the vertical alignment of this child view.

Declaration
C#
Copy
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 view.

Exceptions
Type Condition
System.ArgumentNullException

The view cannot be null.

API Level: 9

Implements

System.IDisposable