Class ItemsLayouter

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll
API Level:
9

Default layout manager for RecyclerView. Layouting RecyclerViewItem on the scroll ContentContainer which need to be visible on the view by scroll position.

C#
Copy
public abstract class ItemsLayouter : object, ICollectionChangedNotifier, IDisposable
Inheritance
ItemsLayouter
Derived
Implements
IDisposable

Properties

View Source

CandidateMargin

Candidate item's Margin for scroll size measure.

Declaration
C#
Copy
protected Extents CandidateMargin { get; set; }
Property Value
Type Description
Extents
View Source

Container

Container which contains ViewItems.

Declaration
C#
Copy
protected View Container { get; }
Property Value
Type Description
View
View Source

FirstVisible

First index of visible items.

Declaration
C#
Copy
protected int FirstVisible { get; set; }
Property Value
Type Description
Int32
View Source

GroupItems

Visible ViewItem.

Declaration
C#
Copy
protected virtual List<ItemsLayouter.GroupInfo> GroupItems { get; }
Property Value
Type Description
List<ItemsLayouter.GroupInfo>
View Source

IsHorizontal

boolean flag of scrollable horizontal direction.

Declaration
C#
Copy
protected bool IsHorizontal { get; set; }
Property Value
Type Description
Boolean
View Source

IsInitialized

Flag of layouter initialization.

Declaration
C#
Copy
protected bool IsInitialized { get; set; }
Property Value
Type Description
Boolean
View Source

ItemsView

Parent ItemsView.

Declaration
C#
Copy
protected RecyclerView ItemsView { get; set; }
Property Value
Type Description
RecyclerView
View Source

LastVisible

Last index of visible items.

Declaration
C#
Copy
protected int LastVisible { get; set; }
Property Value
Type Description
Int32
View Source

Padding

Padding for ContentContainer of RecyclerView.

Declaration
C#
Copy
public Extents Padding { get; set; }
Property Value
Type Description
Extents
View Source

PrevScrollPosition

The last scrolled position which is calculated by ScrollableBase. The value should be updated in the Recycle() method.

Declaration
C#
Copy
protected float PrevScrollPosition { get; set; }
Property Value
Type Description
Single
View Source

ScrollContentSize

Content size of scrollable.

Declaration
C#
Copy
protected float ScrollContentSize { get; set; }
Property Value
Type Description
Single
View Source

Source

Internal item source that organized. Check IItemSource and IGrouppedItemSoure also.

Declaration
C#
Copy
protected IItemSource Source { get; }
Property Value
Type Description
IItemSource
View Source

StepCandidate

Candidate item step size for scroll size measure.

Declaration
C#
Copy
protected float StepCandidate { get; set; }
Property Value
Type Description
Single
View Source

VisibleItems

Visible ViewItem.

Declaration
C#
Copy
protected List<RecyclerViewItem> VisibleItems { get; }
Property Value
Type Description
List<RecyclerViewItem>

Methods

View Source

CalculateCandidateScrollPosition(Single)

Adjust scrolling position by own scrolling rules.

Declaration
C#
Copy
public virtual float CalculateCandidateScrollPosition(float scrollPosition)
Parameters
Type Name Description
Single scrollPosition

Scroll position which is calculated by ScrollableBase

Returns
Type Description
Single
View Source

CalculateLayoutOrientationSize()

This is called to find out how much container size can be.

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

Clear()

Clear the current screen and all properties.

Declaration
C#
Copy
public virtual void Clear()
API Level: 9
View Source

Dispose()

Dispose ItemsLayouter and all children on it.

Declaration
C#
Copy
public void Dispose()
API Level: 9
View Source

Dispose(Boolean)

Dispose ItemsLayouter and all children on it.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true when it disposed by Dispose().

View Source

FindVisibleItems((Single X, Single Y))

Find consecutive visible items index.

Declaration
C#
Copy
protected virtual (int start, int end) FindVisibleItems((float X, float Y) visibleArea)
Parameters
Type Name Description
ValueTuple<Single, Single> visibleArea

float turple of visible area start position to end position.

Returns
Type Description
ValueTuple<Int32, Int32>
View Source

GetItemPosition(Int32)

Get item position.

Declaration
C#
Copy
protected virtual (float X, float Y) GetItemPosition(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
ValueTuple<Single, Single>
View Source

GetItemSize(Int32)

Get item size.

Declaration
C#
Copy
protected virtual (float Width, float Height) GetItemSize(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
ValueTuple<Single, Single>
View Source

GetVisibleItem(Int32)

Get visible item object on index if it is realized.

Declaration
C#
Copy
protected virtual RecyclerViewItem GetVisibleItem(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
RecyclerViewItem
View Source

Initialize(RecyclerView)

Clean up ItemsLayouter.

Declaration
C#
Copy
public virtual void Initialize(RecyclerView view)
Parameters
Type Name Description
RecyclerView view

ItemsView of layouter.

API Level: 9
View Source

MeasureChild(RecyclerView, RecyclerViewItem)

Measure the size of child ViewItem manually.

Declaration
C#
Copy
protected virtual void MeasureChild(RecyclerView parent, RecyclerViewItem child)
Parameters
Type Name Description
RecyclerView parent

Parent ItemsView.

RecyclerViewItem child

Child ViewItem to Measure()

View Source

NotifyDataSetChanged()

Notify the dataset is Changed.

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

NotifyItemChanged(IItemSource, Int32)

Notify the observable item in startIndex is changed.

Declaration
C#
Copy
public virtual void NotifyItemChanged(IItemSource source, int startIndex)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startIndex

Changed item index.

View Source

NotifyItemInserted(IItemSource, Int32)

Notify the observable item is inserted in dataset.

Declaration
C#
Copy
public virtual void NotifyItemInserted(IItemSource source, int startIndex)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startIndex

Inserted item index.

View Source

NotifyItemMoved(IItemSource, Int32, Int32)

Notify the observable item is moved from fromPosition to ToPosition.

Declaration
C#
Copy
public virtual void NotifyItemMoved(IItemSource source, int fromPosition, int toPosition)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 fromPosition

Previous item position.

Int32 toPosition

Moved item position.

View Source

NotifyItemRangeChanged(IItemSource, Int32, Int32)

Notify the range of observable items from start to end are changed.

Declaration
C#
Copy
public virtual void NotifyItemRangeChanged(IItemSource source, int startRange, int endRange)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startRange

Start index of changed items range.

Int32 endRange

End index of changed items range.

View Source

NotifyItemRangeInserted(IItemSource, Int32, Int32)

Notify the count range of observable items are inserted in startIndex.

Declaration
C#
Copy
public virtual void NotifyItemRangeInserted(IItemSource source, int startIndex, int count)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startIndex

Start index of inserted items range.

Int32 count

The number of inserted items.

View Source

NotifyItemRangeMoved(IItemSource, Int32, Int32, Int32)

Notify the range of the observable items are moved from fromPosition to ToPosition.

Declaration
C#
Copy
public virtual void NotifyItemRangeMoved(IItemSource source, int fromPosition, int toPosition, int count)
Parameters
Type Name Description
IItemSource source
Int32 fromPosition
Int32 toPosition
Int32 count
View Source

NotifyItemRangeRemoved(IItemSource, Int32, Int32)

Notify the count range of observable items from the startIndex are removed.

Declaration
C#
Copy
public virtual void NotifyItemRangeRemoved(IItemSource source, int startIndex, int count)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startIndex

Start index of removed items range.

Int32 count

The number of removed items

View Source

NotifyItemRemoved(IItemSource, Int32)

Notify the observable item in startIndex is removed.

Declaration
C#
Copy
public virtual void NotifyItemRemoved(IItemSource source, int startIndex)
Parameters
Type Name Description
IItemSource source

Dataset source.

Int32 startIndex

Index of removed item.

View Source

NotifyItemSizeChanged(RecyclerViewItem)

Notify the relayout of ViewItem.

Declaration
C#
Copy
public virtual void NotifyItemSizeChanged(RecyclerViewItem item)
Parameters
Type Name Description
RecyclerViewItem item

updated ViewItem.

View Source

RequestLayout(Single, Boolean)

This is called to find out where items are lain out according to current scroll position.

Declaration
C#
Copy
public virtual void RequestLayout(float scrollPosition, bool force = false)
Parameters
Type Name Description
Single scrollPosition

Scroll position which is calculated by ScrollableBase

Boolean force

boolean force flag to layouting forcely.

API Level: 9
View Source

RequestNextFocusableView(View, View.FocusDirection, Boolean)

Gets the next keyboard focusable view in this control towards the given direction.
A control needs to override this function in order to support two dimensional keyboard navigation.

Declaration
C#
Copy
public virtual View RequestNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
Parameters
Type Name Description
View currentFocusedView

The current focused view.

View.FocusDirection direction

The direction to move the focus towards.

Boolean loopEnabled

Whether the focus movement should be looped within the control.

Returns
Type Description
View

The next keyboard focusable view in this control or an empty handle if no view can be focused.

Implements

IDisposable

Extension Methods