Class FlexibleViewAdapter
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
FlexibleViewAdapters provide a binding from an app-specific data set to views that are displayed within a FlexibleView.
C#Copypublic abstract class FlexibleViewAdapter : object
- Inheritance
-
FlexibleViewAdapter
Methods
Declaration
C#Copypublic abstract int GetItemCount()
Returns
Type | Description |
---|---|
Int32 |
GetItemViewType(Int32)
Return the view type of the item at position for the purposes of view recycling.
Declaration
C#Copypublic virtual int GetItemViewType(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | The position of the item within the adapter's data set. |
Returns
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic void NotifyDataSetChanged()
NotifyItemChanged(Int32)
Notify any registered observers that the data set has changed. It indicates that any reflection of the data at position is out of date and should be updated.
Declaration
C#Copypublic void NotifyItemChanged(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | Position of the item that has changed |
NotifyItemInserted(Int32)
Notify any registered observers that the data set has been newly inserted. It indicates that any reflection of the data at position is out of date and should be updated.
Declaration
C#Copypublic void NotifyItemInserted(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | Position of the item that has been newly inserted |
NotifyItemMoved(Int32, Int32)
Notify any registered observers that the item reflected at fromPosition has been moved to toPosition.
Declaration
C#Copypublic void NotifyItemMoved(int fromPosition, int toPosition)
Parameters
Type | Name | Description |
---|---|---|
Int32 | fromPosition | Previous position of the item |
Int32 | toPosition | New position of the item. |
NotifyItemRangeChanged(Int32, Int32)
Notify any registered observers that the itemCount items starting at position positionStart have changed. An optional payload can be passed to each changed item.
Declaration
C#Copypublic void NotifyItemRangeChanged(int positionStart, int itemCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | positionStart | Position of the first item that has changed |
Int32 | itemCount | Number of items that have changed |
NotifyItemRangeInserted(Int32, Int32)
Notify any registered observers that the itemCount items starting at position positionStart have been newly inserted.
Declaration
C#Copypublic void NotifyItemRangeInserted(int positionStart, int itemCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | positionStart | Position of the first item that was inserted |
Int32 | itemCount | Number of items inserted |
NotifyItemRangeRemoved(Int32, Int32)
Notify any registered observers that the itemCount items previously located at positionStart have been removed from the data set.
Declaration
C#Copypublic void NotifyItemRangeRemoved(int positionStart, int itemCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | positionStart | Previous position of the first item that was removed |
Int32 | itemCount | Number of items removed from the data set |
NotifyItemRemoved(Int32)
Notify any registered observers that the item previously located at position has been removed from the data set.
Declaration
C#Copypublic void NotifyItemRemoved(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | Previous position of the first item that was removed |
OnAttachedToRecyclerView(FlexibleView)
Called by FlexibleView when it starts observing this FlexibleViewAdapter. Keep in mind that same adapter may be observed by multiple FlexibleView.
Declaration
C#Copypublic virtual void OnAttachedToRecyclerView(FlexibleView flexibleView)
Parameters
Type | Name | Description |
---|---|---|
FlexibleView | flexibleView | The FlexibleView instance which started observing this adapter. |
OnBindViewHolder(FlexibleViewViewHolder, Int32)
Called by FlexibleView to display the data at the specified position.
Declaration
C#Copypublic abstract void OnBindViewHolder(FlexibleViewViewHolder holder, int position)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | The FlexibleViewViewHolder which should be updated to represent the contents of the item at the given position in the data set. |
Int32 | position | The position of the item within the adapter's data set. |
OnCreateViewHolder(Int32)
Called when FlexibleView needs a new FlexibleViewViewHolder of the given type to represent an item.
Declaration
C#Copypublic abstract FlexibleViewViewHolder OnCreateViewHolder(int viewType)
Parameters
Type | Name | Description |
---|---|---|
Int32 | viewType | The view type of the new View |
Returns
Type | Description |
---|---|
FlexibleViewViewHolder |
OnDestroyViewHolder(FlexibleViewViewHolder)
Called when a FlexibleViewViewHolder is never used.
Declaration
C#Copypublic abstract void OnDestroyViewHolder(FlexibleViewViewHolder holder)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | The FlexibleViewViewHolder which need to be disposed |
OnDetachedFromRecyclerView(FlexibleView)
Called by FlexibleView when it stops observing this FlexibleViewAdapter.
Declaration
C#Copypublic virtual void OnDetachedFromRecyclerView(FlexibleView flexibleView)
Parameters
Type | Name | Description |
---|---|---|
FlexibleView | flexibleView | The FlexibleView instance which stopped observing this adapter. |
Declaration
C#Copypublic virtual void OnFocusChange(FlexibleView flexibleView, int previousFocus, int currentFocus)
Parameters
Type | Name | Description |
---|---|---|
FlexibleView | flexibleView | The FlexibleView into which the focus FlexibleViewViewHolder changed. |
Int32 | previousFocus | The position of previous focus |
Int32 | currentFocus | The position of current focus |
OnViewAttachedToWindow(FlexibleViewViewHolder)
Called when a view created by this adapter has been attached to a window. This can be used as a reasonable signal that the view is about to be seen by the user.
Declaration
C#Copypublic virtual void OnViewAttachedToWindow(FlexibleViewViewHolder holder)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | Holder of the view being attached. |
OnViewDetachedFromWindow(FlexibleViewViewHolder)
Called when a view created by this adapter has been detached from its window.
Declaration
C#Copypublic virtual void OnViewDetachedFromWindow(FlexibleViewViewHolder holder)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | Holder of the view being detached. |
OnViewRecycled(FlexibleViewViewHolder)
Called when a view created by this adapter has been recycled. If an item view has large or expensive data bound to it such as large bitmaps, this may be a good place to release those resources
Declaration
C#Copypublic virtual void OnViewRecycled(FlexibleViewViewHolder holder)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | The FlexibleViewViewHolder will be recycled. |