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#Copypublic abstract class ItemsLayouter : object, ICollectionChangedNotifier, IDisposable
- Inheritance
-
ItemsLayouter
- Derived
- Implements
-
IDisposable
Properties
Declaration
C#Copyprotected Extents CandidateMargin { get; set; }
Property Value
Type | Description |
---|---|
Extents |
Declaration
C#Copyprotected View Container { get; }
Property Value
Type | Description |
---|---|
View |
Declaration
C#Copyprotected int FirstVisible { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copyprotected virtual List<ItemsLayouter.GroupInfo> GroupItems { get; }
Property Value
Type | Description |
---|---|
List<ItemsLayouter.GroupInfo> |
Declaration
C#Copyprotected bool IsHorizontal { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copyprotected bool IsInitialized { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copyprotected RecyclerView ItemsView { get; set; }
Property Value
Type | Description |
---|---|
RecyclerView |
Declaration
C#Copyprotected int LastVisible { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic Extents Padding { get; set; }
Property Value
Type | Description |
---|---|
Extents |
PrevScrollPosition
The last scrolled position which is calculated by ScrollableBase. The value should be updated in the Recycle() method.
Declaration
C#Copyprotected float PrevScrollPosition { get; set; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copyprotected float ScrollContentSize { get; set; }
Property Value
Type | Description |
---|---|
Single |
Source
Internal item source that organized. Check IItemSource and IGrouppedItemSoure also.
Declaration
C#Copyprotected IItemSource Source { get; }
Property Value
Type | Description |
---|---|
IItemSource |
Declaration
C#Copyprotected float StepCandidate { get; set; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copyprotected List<RecyclerViewItem> VisibleItems { get; }
Property Value
Type | Description |
---|---|
List<RecyclerViewItem> |
Methods
CalculateCandidateScrollPosition(Single)
Adjust scrolling position by own scrolling rules.
Declaration
C#Copypublic virtual float CalculateCandidateScrollPosition(float scrollPosition)
Parameters
Type | Name | Description |
---|---|---|
Single | scrollPosition | Scroll position which is calculated by ScrollableBase |
Returns
Type | Description |
---|---|
Single |
CalculateLayoutOrientationSize()
This is called to find out how much container size can be.
Declaration
C#Copypublic virtual float CalculateLayoutOrientationSize()
Returns
Type | Description |
---|---|
Single |
Declaration
C#Copypublic virtual void Clear()
API Level: 9
Declaration
C#Copypublic void Dispose()
API Level: 9
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true when it disposed by Dispose(). |
Declaration
C#Copyprotected 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> |
Declaration
C#Copyprotected virtual (float X, float Y) GetItemPosition(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
ValueTuple<Single, Single> |
Declaration
C#Copyprotected virtual (float Width, float Height) GetItemSize(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
ValueTuple<Single, Single> |
Declaration
C#Copyprotected virtual RecyclerViewItem GetVisibleItem(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
RecyclerViewItem |
Declaration
C#Copypublic virtual void Initialize(RecyclerView view)
Parameters
Type | Name | Description |
---|---|---|
RecyclerView | view | ItemsView of layouter. |
API Level: 9
MeasureChild(RecyclerView, RecyclerViewItem)
Measure the size of child ViewItem manually.
Declaration
C#Copyprotected virtual void MeasureChild(RecyclerView parent, RecyclerViewItem child)
Parameters
Type | Name | Description |
---|---|---|
RecyclerView | parent | Parent ItemsView. |
RecyclerViewItem | child | Child ViewItem to Measure() |
Declaration
C#Copypublic virtual void NotifyDataSetChanged()
NotifyItemChanged(IItemSource, Int32)
Notify the observable item in startIndex is changed.
Declaration
C#Copypublic virtual void NotifyItemChanged(IItemSource source, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
IItemSource | source | Dataset source. |
Int32 | startIndex | Changed item index. |
NotifyItemInserted(IItemSource, Int32)
Notify the observable item is inserted in dataset.
Declaration
C#Copypublic virtual void NotifyItemInserted(IItemSource source, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
IItemSource | source | Dataset source. |
Int32 | startIndex | Inserted item index. |
NotifyItemMoved(IItemSource, Int32, Int32)
Notify the observable item is moved from fromPosition to ToPosition.
Declaration
C#Copypublic 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. |
NotifyItemRangeChanged(IItemSource, Int32, Int32)
Notify the range of observable items from start to end are changed.
Declaration
C#Copypublic 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. |
NotifyItemRangeInserted(IItemSource, Int32, Int32)
Notify the count range of observable items are inserted in startIndex.
Declaration
C#Copypublic 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. |
NotifyItemRangeMoved(IItemSource, Int32, Int32, Int32)
Notify the range of the observable items are moved from fromPosition to ToPosition.
Declaration
C#Copypublic virtual void NotifyItemRangeMoved(IItemSource source, int fromPosition, int toPosition, int count)
Parameters
Type | Name | Description |
---|---|---|
IItemSource | source | |
Int32 | fromPosition | |
Int32 | toPosition | |
Int32 | count |
NotifyItemRangeRemoved(IItemSource, Int32, Int32)
Notify the count range of observable items from the startIndex are removed.
Declaration
C#Copypublic 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 |
NotifyItemRemoved(IItemSource, Int32)
Notify the observable item in startIndex is removed.
Declaration
C#Copypublic virtual void NotifyItemRemoved(IItemSource source, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
IItemSource | source | Dataset source. |
Int32 | startIndex | Index of removed item. |
Declaration
C#Copypublic virtual void NotifyItemSizeChanged(RecyclerViewItem item)
Parameters
Type | Name | Description |
---|---|---|
RecyclerViewItem | item | updated ViewItem. |
RequestLayout(Single, Boolean)
This is called to find out where items are lain out according to current scroll position.
Declaration
C#Copypublic 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
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#Copypublic 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. |