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.

    public abstract class FlexibleViewAdapter
    Inheritance
    object
    FlexibleViewAdapter

    Methods

    View Source

    GetItemCount()

    Returns the total number of items in the data set held by the adapter.

    Declaration
    public abstract int GetItemCount()
    Returns
    Type Description
    int
    View Source

    GetItemViewType(int)

    Return the view type of the item at position for the purposes of view recycling.

    Declaration
    public virtual int GetItemViewType(int position)
    Parameters
    Type Name Description
    int position

    The position of the item within the adapter's data set.

    Returns
    Type Description
    int
    View Source

    NotifyDataSetChanged()

    Notify any registered observers that the data set has changed.

    Declaration
    public void NotifyDataSetChanged()
    View Source

    NotifyItemChanged(int)

    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
    public void NotifyItemChanged(int position)
    Parameters
    Type Name Description
    int position

    Position of the item that has changed

    View Source

    NotifyItemInserted(int)

    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
    public void NotifyItemInserted(int position)
    Parameters
    Type Name Description
    int position

    Position of the item that has been newly inserted

    View Source

    NotifyItemMoved(int, int)

    Notify any registered observers that the item reflected at fromPosition has been moved to toPosition.

    Declaration
    public void NotifyItemMoved(int fromPosition, int toPosition)
    Parameters
    Type Name Description
    int fromPosition

    Previous position of the item

    int toPosition

    New position of the item.

    View Source

    NotifyItemRangeChanged(int, int)

    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
    public void NotifyItemRangeChanged(int positionStart, int itemCount)
    Parameters
    Type Name Description
    int positionStart

    Position of the first item that has changed

    int itemCount

    Number of items that have changed

    View Source

    NotifyItemRangeInserted(int, int)

    Notify any registered observers that the itemCount items starting at position positionStart have been newly inserted.

    Declaration
    public void NotifyItemRangeInserted(int positionStart, int itemCount)
    Parameters
    Type Name Description
    int positionStart

    Position of the first item that was inserted

    int itemCount

    Number of items inserted

    View Source

    NotifyItemRangeRemoved(int, int)

    Notify any registered observers that the itemCount items previously located at positionStart have been removed from the data set.

    Declaration
    public void NotifyItemRangeRemoved(int positionStart, int itemCount)
    Parameters
    Type Name Description
    int positionStart

    Previous position of the first item that was removed

    int itemCount

    Number of items removed from the data set

    View Source

    NotifyItemRemoved(int)

    Notify any registered observers that the item previously located at position has been removed from the data set.

    Declaration
    public void NotifyItemRemoved(int position)
    Parameters
    Type Name Description
    int position

    Previous position of the first item that was removed

    View Source

    OnAttachedToRecyclerView(FlexibleView)

    Called by FlexibleView when it starts observing this FlexibleViewAdapter. Keep in mind that same adapter may be observed by multiple FlexibleView.

    Declaration
    public virtual void OnAttachedToRecyclerView(FlexibleView flexibleView)
    Parameters
    Type Name Description
    FlexibleView flexibleView

    The FlexibleView instance which started observing this adapter.

    View Source

    OnBindViewHolder(FlexibleViewViewHolder, int)

    Called by FlexibleView to display the data at the specified position.

    Declaration
    public 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.

    int position

    The position of the item within the adapter's data set.

    View Source

    OnCreateViewHolder(int)

    Called when FlexibleView needs a new FlexibleViewViewHolder of the given type to represent an item.

    Declaration
    public abstract FlexibleViewViewHolder OnCreateViewHolder(int viewType)
    Parameters
    Type Name Description
    int viewType

    The view type of the new View

    Returns
    Type Description
    FlexibleViewViewHolder
    View Source

    OnDestroyViewHolder(FlexibleViewViewHolder)

    Called when a FlexibleViewViewHolder is never used.

    Declaration
    public abstract void OnDestroyViewHolder(FlexibleViewViewHolder holder)
    Parameters
    Type Name Description
    FlexibleViewViewHolder holder

    The FlexibleViewViewHolder which need to be disposed

    View Source

    OnDetachedFromRecyclerView(FlexibleView)

    Called by FlexibleView when it stops observing this FlexibleViewAdapter.

    Declaration
    public virtual void OnDetachedFromRecyclerView(FlexibleView flexibleView)
    Parameters
    Type Name Description
    FlexibleView flexibleView

    The FlexibleView instance which stopped observing this adapter.

    View Source

    OnFocusChange(FlexibleView, int, int)

    Called when FlexibleView focus changed.

    Declaration
    public virtual void OnFocusChange(FlexibleView flexibleView, int previousFocus, int currentFocus)
    Parameters
    Type Name Description
    FlexibleView flexibleView

    The FlexibleView into which the focus FlexibleViewViewHolder changed.

    int previousFocus

    The position of previous focus

    int currentFocus

    The position of current focus

    View Source

    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
    public virtual void OnViewAttachedToWindow(FlexibleViewViewHolder holder)
    Parameters
    Type Name Description
    FlexibleViewViewHolder holder

    Holder of the view being attached.

    View Source

    OnViewDetachedFromWindow(FlexibleViewViewHolder)

    Called when a view created by this adapter has been detached from its window.

    Declaration
    public virtual void OnViewDetachedFromWindow(FlexibleViewViewHolder holder)
    Parameters
    Type Name Description
    FlexibleViewViewHolder holder

    Holder of the view being detached.

    View Source

    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
    public virtual void OnViewRecycled(FlexibleViewViewHolder holder)
    Parameters
    Type Name Description
    FlexibleViewViewHolder holder

    The FlexibleViewViewHolder will be recycled.

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX