Class RecyclerView

    Definition

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

    A View that serves as a base class for views that contain a templated list of items.

    public abstract class RecyclerView : ScrollableBase, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider, ICollectionChangedNotifier
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    View
    ViewWrapper
    CustomView
    VisualView
    Control
    ScrollableBase
    RecyclerView
    Derived
    CollectionView
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider
    ICollectionChangedNotifier

    Constructors

    View Source

    RecyclerView()

    Base Constructor

    Declaration
    public RecyclerView()
    View Source

    RecyclerView(ControlStyle)

    Creates a new instance of a RecyclerView with style.

    Declaration
    public RecyclerView(ControlStyle style)
    Parameters
    Type Name Description
    ControlStyle style

    A style applied to the newly created RecyclerView.

    Fields

    View Source

    ItemsSourceProperty

    ItemsSourceProperty

    Declaration
    public static readonly BindableProperty ItemsSourceProperty
    Field Value
    Type Description
    BindableProperty
    View Source

    ItemTemplateProperty

    ItemTemplateProperty

    Declaration
    public static readonly BindableProperty ItemTemplateProperty
    Field Value
    Type Description
    BindableProperty

    Properties

    View Source

    CacheMax

    Max size of RecycleCache. Default is 50.

    Declaration
    protected int CacheMax { get; set; }
    Property Value
    Type Description
    int
    View Source

    InternalItemsLayouter

    Internal Items Layouter.

    Declaration
    protected virtual ItemsLayouter InternalItemsLayouter { get; set; }
    Property Value
    Type Description
    ItemsLayouter
    View Source

    ItemsSource

    Item's source data.

    Declaration
    public virtual IEnumerable ItemsSource { get; set; }
    Property Value
    Type Description
    IEnumerable
    View Source

    ItemTemplate

    DataTemplate for items.

    Declaration
    public virtual DataTemplate ItemTemplate { get; set; }
    Property Value
    Type Description
    DataTemplate
    View Source

    RecycleCache

    RecycleCache of ViewItem.

    Declaration
    protected List<RecyclerViewItem> RecycleCache { get; }
    Property Value
    Type Description
    List<><RecyclerViewItem>

    Methods

    View Source

    AdjustTargetPositionOfScrollAnimation(float)

    Adjust scrolling position by own scrolling rules. Override this function when developer wants to change destination of flicking.(e.g. always snap to center of item)

    Declaration
    protected override float AdjustTargetPositionOfScrollAnimation(float position)
    Parameters
    Type Name Description
    float position

    Scroll position which is calculated by ScrollableBase.

    Returns
    Type Description
    float

    Adjusted scroll destination

    Overrides
    ScrollableBase.AdjustTargetPositionOfScrollAnimation(float)
    View Source

    ClearCache()

    Clear all remaining caches.

    Declaration
    protected virtual void ClearCache()
    View Source

    Dispose(DisposeTypes)

    Dispose ItemsView and all children on it.

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

    Dispose type.

    Overrides
    ScrollableBase.Dispose(DisposeTypes)
    View Source

    NotifyDataSetChanged()

    Notify Dataset is Changed.

    Declaration
    public virtual void NotifyDataSetChanged()
    View Source

    NotifyItemChanged(IItemSource, int)

    Notify observable item is changed.

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

    Dataset source.

    int startIndex

    Changed item index.

    View Source

    NotifyItemInserted(IItemSource, int)

    Notify observable item is inserted in dataset.

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

    Dataset source.

    int startIndex

    Inserted item index.

    View Source

    NotifyItemMoved(IItemSource, int, int)

    Notify observable item is moved from fromPosition to ToPosition.

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

    Dataset source.

    int fromPosition

    Previous item position.

    int toPosition

    Moved item position.

    View Source

    NotifyItemRangeChanged(IItemSource, int, int)

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

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

    Dataset source.

    int startRange

    Start index of changed items range.

    int endRange

    End index of changed items range.

    View Source

    NotifyItemRangeInserted(IItemSource, int, int)

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

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

    Dataset source.

    int startIndex

    Start index of inserted items range.

    int count

    The number of inserted items.

    View Source

    NotifyItemRangeMoved(IItemSource, int, int, int)

    Notify the observable item is moved from fromPosition to ToPosition.

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

    NotifyItemRangeRemoved(IItemSource, int, int)

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

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

    Dataset source.

    int startIndex

    Start index of removed items range.

    int count

    The number of removed items

    View Source

    NotifyItemRemoved(IItemSource, int)

    Notify the observable item in startIndex is removed.

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

    Dataset source.

    int startIndex

    Index of removed item.

    View Source

    OnRelayout(Vector2, RelayoutContainer)

    Called after the size negotiation has been finished for this control.
    The control is expected to assign this given size to itself or its children.
    Should be overridden by derived classes if they need to layout views differently after certain operations like add or remove views, resize, or after changing specific properties.
    As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).

    Declaration
    public override void OnRelayout(Vector2 size, RelayoutContainer container)
    Parameters
    Type Name Description
    Vector2 size

    The allocated size.

    RelayoutContainer container

    The control should add views to this container that it is not able to allocate a size for.

    Overrides
    Control.OnRelayout(Vector2, RelayoutContainer)
    View Source

    OnScrolling(object, ScrollEventArgs)

    On scroll event callback.

    Declaration
    protected virtual void OnScrolling(object source, ScrollEventArgs args)
    Parameters
    Type Name Description
    object source
    ScrollEventArgs args
    View Source

    PopRecycleCache(DataTemplate)

    Pop the item from the recycle cache.

    Declaration
    protected virtual RecyclerViewItem PopRecycleCache(DataTemplate Template)
    Parameters
    Type Name Description
    DataTemplate Template

    Template of wanted item.

    Returns
    Type Description
    RecyclerViewItem
    View Source

    PushRecycleCache(RecyclerViewItem)

    Push the item into the recycle cache. this item will be reused in view update.

    Declaration
    protected virtual bool PushRecycleCache(RecyclerViewItem item)
    Parameters
    Type Name Description
    RecyclerViewItem item

    Target item to push into recycle cache.

    Returns
    Type Description
    bool
    View Source

    RealizeItem(int)

    Realize indexed item.

    Declaration
    protected virtual RecyclerViewItem RealizeItem(int index)
    Parameters
    Type Name Description
    int index

    Index position of realizing item

    Returns
    Type Description
    RecyclerViewItem
    View Source

    UnrealizeItem(RecyclerViewItem, bool)

    Unrealize indexed item.

    Declaration
    protected virtual void UnrealizeItem(RecyclerViewItem item, bool recycle = true)
    Parameters
    Type Name Description
    RecyclerViewItem item

    Target item for unrealizing

    bool recycle

    Allow recycle. default is true

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider
    ICollectionChangedNotifier

    Extension Methods

    ViewExtensions.BackgroundColor(View)
    ViewExtensions.BorderlineColor(View)
    ViewExtensions.BoxShadow(View)
    ViewExtensions.Color(View)
    ViewExtensions.CornerRadius(View)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    ViewExtensions.BackgroundColor<T>(T, float, float, float, float)
    ViewExtensions.BackgroundColor<T>(T, uint, float)
    ViewExtensions.BackgroundColor<T>(T, UIColor)
    ViewExtensions.BackgroundImage<T>(T, string)
    ViewExtensions.Borderline<T>(T, float, UIColor, float)
    ViewExtensions.BorderlineColor<T>(T, float, float, float, float)
    ViewExtensions.BorderlineColor<T>(T, uint, float)
    ViewExtensions.BorderlineColor<T>(T, UIColor)
    ViewExtensions.BorderlineOffset<T>(T, float)
    ViewExtensions.BorderlineWidth<T>(T, float)
    ViewExtensions.BoxShadow<T>(T, float, float, float)
    ViewExtensions.BoxShadow<T>(T, float, UIColor, float, float)
    ViewExtensions.BoxShadow<T>(T, UIShadow)
    ViewExtensions.ClippingMode<T>(T, ClippingModeType)
    ViewExtensions.Color<T>(T, float, float, float, float)
    ViewExtensions.Color<T>(T, uint, float)
    ViewExtensions.Color<T>(T, UIColor)
    ViewExtensions.CornerRadius<T>(T, float, bool)
    ViewExtensions.CornerRadius<T>(T, float, float, float, float, bool)
    ViewExtensions.CornerRadius<T>(T, UICorner)
    ViewExtensions.Focusable<T>(T, bool)
    ViewExtensions.FocusableChildren<T>(T, bool)
    ViewExtensions.FocusableInTouch<T>(T, bool)
    ViewExtensions.ImageShadow<T>(T, ImageShadow)
    ViewExtensions.IsEnabled<T>(T, bool)
    ViewExtensions.Layout<T>(T, LayoutItem)
    ViewExtensions.Opacity<T>(T, float)
    ViewExtensions.Position<T>(T, float, float)
    ViewExtensions.PositionX<T>(T, float)
    ViewExtensions.PositionY<T>(T, float)
    ViewExtensions.Scale<T>(T, float, float)
    ViewExtensions.ScaleX<T>(T, float)
    ViewExtensions.ScaleY<T>(T, float)
    ViewExtensions.Sensitive<T>(T, bool)
    ViewExtensions.Size<T>(T, float, float)
    ViewExtensions.SizeHeight<T>(T, float)
    ViewExtensions.SizeWidth<T>(T, float)
    ViewExtensions.Visibility<T>(T, bool)
    ViewExtensions.VoiceInteractionName<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