Class FlexibleViewLayoutManager

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll

A FlexibleViewLayoutManager is responsible for measuring and positioning item views within a FlexibleView as well as determining the policy for when to recycle item views that are no longer visible to the user.

C#
Copy
public abstract class FlexibleViewLayoutManager : Disposable
Inheritance
FlexibleViewLayoutManager
Derived

Properties

View Source

ChildCount

Return the current number of child views attached to the parent FlexibleView.

Declaration
C#
Copy
public int ChildCount { get; }
Property Value
Type Description
Int32
View Source

FocusPosition

Gets the current focus position in adapter.

Declaration
C#
Copy
public int FocusPosition { get; }
Property Value
Type Description
Int32
View Source

Height

Return the height of the parent FlexibleView.

Declaration
C#
Copy
public float Height { get; }
Property Value
Type Description
Single
View Source

ItemCount

Gets the datas count in data sets.

Declaration
C#
Copy
public int ItemCount { get; }
Property Value
Type Description
Int32
View Source

PaddingBottom

Return the bottom padding of the parent FlexibleView.

Declaration
C#
Copy
public int PaddingBottom { get; }
Property Value
Type Description
Int32
View Source

PaddingLeft

Return the left padding of the parent FlexibleView.

Declaration
C#
Copy
public int PaddingLeft { get; }
Property Value
Type Description
Int32
View Source

PaddingRight

Return the right padding of the parent FlexibleView.

Declaration
C#
Copy
public int PaddingRight { get; }
Property Value
Type Description
Int32
View Source

PaddingTop

Return the top padding of the parent FlexibleView.

Declaration
C#
Copy
public int PaddingTop { get; }
Property Value
Type Description
Int32
View Source

Width

Return the width of the parent FlexibleView.

Declaration
C#
Copy
public float Width { get; }
Property Value
Type Description
Single

Methods

View Source

AddView(FlexibleViewViewHolder)

Add a view to the currently attached FlexibleView if needed.
FlexibleViewLayoutManagers should use this method to add views obtained from a FlexibleViewRecycler using getViewForPosition(int).

Declaration
C#
Copy
public void AddView(FlexibleViewViewHolder holder)
Parameters
Type Name Description
FlexibleViewViewHolder holder

view to add

View Source

AddView(FlexibleViewViewHolder, Int32)

Add a view to the currently attached FlexibleView if needed.
FlexibleViewLayoutManagers should use this method to add views obtained from a FlexibleViewRecycler using getViewForPosition(int).

Declaration
C#
Copy
public void AddView(FlexibleViewViewHolder holder, int index)
Parameters
Type Name Description
FlexibleViewViewHolder holder

view to add

Int32 index

index to add child at

View Source

CanScrollHorizontally()

Query if horizontal scrolling is currently supported. The default implementation returns false.

Declaration
C#
Copy
public virtual bool CanScrollHorizontally()
Returns
Type Description
Boolean
View Source

CanScrollVertically()

Query if vertical scrolling is currently supported. The default implementation returns false.

Declaration
C#
Copy
public virtual bool CanScrollVertically()
Returns
Type Description
Boolean
View Source

ChangeFocus(Int32)

Change the FlexibleViewViewHolder with focusPosition to focus.

Declaration
C#
Copy
public void ChangeFocus(int focusPosition)
Parameters
Type Name Description
Int32 focusPosition

the newly focus position

View Source

ComputeScrollExtent()

Compute the extent of the scrollbar's thumb within the range.

Declaration
C#
Copy
public virtual float ComputeScrollExtent()
Returns
Type Description
Single
View Source

ComputeScrollOffset()

Compute the offset of the scrollbar's thumb within the range.

Declaration
C#
Copy
public virtual float ComputeScrollOffset()
Returns
Type Description
Single
View Source

ComputeScrollRange()

Compute the range that the scrollbar represents.

Declaration
C#
Copy
public virtual float ComputeScrollRange()
Returns
Type Description
Single
View Source

Dispose(DisposeTypes)

Dispose FlexibleView and all children on it.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

Dispose type.

Overrides
View Source

FindFirstVisibleItemView()

Retrieves the first visible item view.

Declaration
C#
Copy
protected virtual FlexibleViewViewHolder FindFirstVisibleItemView()
Returns
Type Description
FlexibleViewViewHolder
View Source

FindItemViewByPosition(Int32)

Finds the view which represents the given adapter position.

Declaration
C#
Copy
public FlexibleViewViewHolder FindItemViewByPosition(int position)
Parameters
Type Name Description
Int32 position

adapter position

Returns
Type Description
FlexibleViewViewHolder
View Source

FindLastVisibleItemView()

Retrieves the last visible item view.

Declaration
C#
Copy
protected virtual FlexibleViewViewHolder FindLastVisibleItemView()
Returns
Type Description
FlexibleViewViewHolder
View Source

GetChildAt(Int32)

Return the child view at the given index.

Declaration
C#
Copy
public FlexibleViewViewHolder GetChildAt(int index)
Parameters
Type Name Description
Int32 index

child index

Returns
Type Description
FlexibleViewViewHolder
View Source

GetNextPosition(Int32, FlexibleViewLayoutManager.Direction)

Retrieves a position that neighbor to current position by direction.

Declaration
C#
Copy
protected abstract int GetNextPosition(int position, FlexibleViewLayoutManager.Direction direction)
Parameters
Type Name Description
Int32 position

The anchor adapter position

FlexibleViewLayoutManager.Direction direction

The direction.

Returns
Type Description
Int32
View Source

LayoutChild(FlexibleViewViewHolder, Single, Single, Single, Single)

Lay out the given child view within the FlexibleView using coordinates that include view margins.

Declaration
C#
Copy
public void LayoutChild(FlexibleViewViewHolder child, float left, float top, float width, float height)
Parameters
Type Name Description
FlexibleViewViewHolder child

Child to lay out

Single left

Left edge, with item view left margin included

Single top

Top edge, with item view top margin included

Single width

Width, with item view left and right margin included

Single height

Height, with item view top and bottom margin included

View Source

OffsetChildrenHorizontal(Single, Boolean)

Offset all child views attached to the parent FlexibleView by dx pixels along the horizontal axis.

Declaration
C#
Copy
public void OffsetChildrenHorizontal(float dx, bool immediate)
Parameters
Type Name Description
Single dx

Pixels to offset by

Boolean immediate

specify if the offset need animation

View Source

OffsetChildrenVertical(Single, Boolean)

Offset all child views attached to the parent FlexibleView by dy pixels along the vertical axis.

Declaration
C#
Copy
public void OffsetChildrenVertical(float dy, bool immediate)
Parameters
Type Name Description
Single dy

Pixels to offset by

Boolean immediate

specify if the offset need animation

View Source

OnLayoutChildren(FlexibleViewRecycler)

Layout all relevant child views from the given adapter.

Declaration
C#
Copy
public abstract void OnLayoutChildren(FlexibleViewRecycler recycler)
Parameters
Type Name Description
FlexibleViewRecycler recycler

Recycler to use for fetching potentially cached views for a position

View Source

OnLayoutCompleted()

Called after a full layout calculation is finished.

Declaration
C#
Copy
public virtual void OnLayoutCompleted()
View Source

RecycleChildren(FlexibleViewRecycler, Int32, Int32, Boolean)

Recycles children between given indices..

Declaration
C#
Copy
public void RecycleChildren(FlexibleViewRecycler recycler, int startIndex, int endIndex, bool immediate)
Parameters
Type Name Description
FlexibleViewRecycler recycler

Recycler to recycle views into

Int32 startIndex

inclusive

Int32 endIndex

exclusive

Boolean immediate

recycle immediately or add to pending list and recycle later.

View Source

RelayoutRequest()

Calls {@code FlexibleView#RelayoutRequest} on the underlying FlexibleView.

Declaration
C#
Copy
public void RelayoutRequest()
View Source

RemoveAndRecycleViewAt(Int32, FlexibleViewRecycler)

Declaration
C#
Copy
public void RemoveAndRecycleViewAt(int index, FlexibleViewRecycler recycler)
Parameters
Type Name Description
Int32 index
FlexibleViewRecycler recycler
View Source

ScrapAttachedViews(FlexibleViewRecycler)

Temporarily detach and scrap all currently attached child views. Views will be scrapped into the given FlexibleViewRecycler. The FlexibleViewRecycler may prefer to reuse scrap views before other views that were previously recycled.

Declaration
C#
Copy
public void ScrapAttachedViews(FlexibleViewRecycler recycler)
Parameters
Type Name Description
FlexibleViewRecycler recycler

Recycler to scrap views into

View Source

ScrollHorizontallyBy(Single, FlexibleViewRecycler, Boolean)

Scroll horizontally by dy pixels in screen coordinates.

Declaration
C#
Copy
public virtual float ScrollHorizontallyBy(float dy, FlexibleViewRecycler recycler, bool immediate)
Parameters
Type Name Description
Single dy

distance to scroll in pixels. Y increases as scroll position approaches the top.

FlexibleViewRecycler recycler

Recycler to use for fetching potentially cached views for a position

Boolean immediate

Specify if the scroll need animation

Returns
Type Description
Single
View Source

ScrollToPosition(Int32)

Scroll the FlexibleView to make the position visible.

Declaration
C#
Copy
public virtual void ScrollToPosition(int position)
Parameters
Type Name Description
Int32 position

Scroll to this adapter position

View Source

ScrollToPositionWithOffset(Int32, Int32)

Scroll to the specified adapter position with the given offset from resolved layout start.

Declaration
C#
Copy
public virtual void ScrollToPositionWithOffset(int position, int offset)
Parameters
Type Name Description
Int32 position

Scroll to this adapter position

Int32 offset

The distance (in pixels) between the start edge of the item view and start edge of the FlexibleView.

View Source

ScrollVerticallyBy(Single, FlexibleViewRecycler, Boolean)

Scroll vertically by dy pixels in screen coordinates.

Declaration
C#
Copy
public virtual float ScrollVerticallyBy(float dy, FlexibleViewRecycler recycler, bool immediate)
Parameters
Type Name Description
Single dy

distance to scroll in pixels. Y increases as scroll position approaches the top.

FlexibleViewRecycler recycler

Recycler to use for fetching potentially cached views for a position

Boolean immediate

Specify if the scroll need animation

Returns
Type Description
Single

Extension Methods