Click or drag to resize

ScrollRectItemsAdapter8TParams, TItemViewsHolder Class

Inheritance Hierarchy

Namespace:  frame8.Logic.Misc.Visual.UI.ScrollRectItemsAdapter
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public abstract class ScrollRectItemsAdapter8<TParams, TItemViewsHolder>
where TParams : BaseParams
where TItemViewsHolder : BaseItemViewsHolder

Type Parameters

TParams
TItemViewsHolder

The ScrollRectItemsAdapter8TParams, TItemViewsHolder type exposes the following members.

Constructors
Properties
Methods
  NameDescription
Public methodChangeItemCountTo(Int32)
Public methodChangeItemCountTo(Int32, Boolean)
Protected methodCreateViewHolder
Called when there are no recyclable views for itemIndex. Provide a new viewholder instance for itemIndex This can also be used as a hint to initialize your viewholder
Public methodDispose
Public methodGetItemCount
Protected methodGetItemHeight
Only called for vertical ScrollRects
Public methodGetItemNormalizedOffsetFromParentStart_NotAccurate
Public methodGetItemOffsetFromParentStart

returns the distance of the iten's left (if scroll view is Horizontal) or top (if scroll view is Vertical) edge

from the parent's left (respectively, top) edge

Public methodGetItemViewsHolder
Get the viewHolder with a speciffic index in the "visible items" array. Example: if you pass 0, the first visible ViewHolder will be returned (if there's any) Not to be mistaken to the other method 'GetItemViewsHolderIfVisible(int withItemIndex)', which uses the itemIndex, i.e. the index in the list of models. Returns null if the supplied parameter is >= VisibleItemsCount
Public methodGetItemViewsHolderIfVisible(Int32)
Public methodGetItemViewsHolderIfVisible(RectTransform)
Protected methodGetItemWidth
Only called for horizontal ScrollRects
Public methodInit
Protected methodInitOrUpdateItemViewHolder
Protected methodIsRecyclable
Self-explanatory. The default implementation returns true each time
Public methodNotifyScrollViewSizeChanged

This is called automatically when screen size (or the orientation) changes

But if you somehow resize the scrollview manually, you also must call this

Public methodRequestChangeItemSizeAndUpdateLayout
Public methodScrollTo
Aligns the ScrollRect's content so that the item with itemIndex will be at the top
Public methodSetContentEndOffsetFromViewportEnd
offset should be a valid value. See how it's clamped in
Public methodSetContentStartOffsetFromViewportStart
offset should be a valid value. See how it's clamped in
Public methodSmoothScrollProgressCoroutine
Public methodSmoothScrollProgressCoroutine_FasterButSometimesChoppy
The old way of doing it; the name says it all
Public methodSmoothScrollTo
Utility to smooth scroll.
Top
Events
  NameDescription
Public eventItemsRefreshed
Top
Fields
Version Information

Optimized ScrollView Adapter

Supported in: 2.5.2
See Also