ScrollRectItemsAdapter8TParams, TItemViewsHolder Class |
Namespace: frame8.Logic.Misc.Visual.UI.ScrollRectItemsAdapter
public abstract class ScrollRectItemsAdapter8<TParams, TItemViewsHolder> where TParams : BaseParams where TItemViewsHolder : BaseItemViewsHolder
The ScrollRectItemsAdapter8TParams, TItemViewsHolder type exposes the following members.
| Name | Description | |
|---|---|---|
| ScrollRectItemsAdapter8TParams, TItemViewsHolder |
| Name | Description | |
|---|---|---|
| Parameters | ||
| VisibleItemsCount |
| Name | Description | |
|---|---|---|
| ChangeItemCountTo(Int32) | ||
| ChangeItemCountTo(Int32, Boolean) | ||
| CreateViewHolder |
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
| |
| Dispose | ||
| GetItemCount | ||
| GetItemHeight |
Only called for vertical ScrollRects
| |
| GetItemNormalizedOffsetFromParentStart_NotAccurate | ||
| GetItemOffsetFromParentStart | 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 | |
| GetItemViewsHolder |
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
| |
| GetItemViewsHolderIfVisible(Int32) | ||
| GetItemViewsHolderIfVisible(RectTransform) | ||
| GetItemWidth |
Only called for horizontal ScrollRects
| |
| Init | ||
| InitOrUpdateItemViewHolder | ||
| IsRecyclable |
Self-explanatory. The default implementation returns true each time
| |
| NotifyScrollViewSizeChanged | This is called automatically when screen size (or the orientation) changes But if you somehow resize the scrollview manually, you also must call this | |
| RequestChangeItemSizeAndUpdateLayout | ||
| ScrollTo |
Aligns the ScrollRect's content so that the item with itemIndex will be at the top
| |
| SetContentEndOffsetFromViewportEnd | offset should be a valid value. See how it's clamped in | |
| SetContentStartOffsetFromViewportStart | offset should be a valid value. See how it's clamped in | |
| SmoothScrollProgressCoroutine | ||
| SmoothScrollProgressCoroutine_FasterButSometimesChoppy |
The old way of doing it; the name says it all
| |
| SmoothScrollTo |
Utility to smooth scroll.
|
| Name | Description | |
|---|---|---|
| ItemsRefreshed |
| Name | Description | |
|---|---|---|
| _Params | ||
| _VisibleItems | ||
| _VisibleItemsCount |