GridAdapterTParams, TCellVH Methods |
The GridAdapterTParams, TCellVH generic type exposes the following members.
| Name | Description | |
|---|---|---|
| ChangeItemCountTo | (Overrides ScrollRectItemsAdapter8TParams, TItemViewsHolderChangeItemCountTo(Int32).) | |
| ChangeItemsCount | Overridden in order to convert the cellsCount to groupsCount before passing it to the base's implementation (Overrides SRIATParams, TItemViewsHolderChangeItemsCount(ItemCountChangeMode, Int32, Int32, Boolean, Boolean).) | |
| CreateViewHolder | (Overrides ScrollRectItemsAdapter8TParams, TItemViewsHolderCreateViewHolder(Int32).) | |
| CreateViewsHolder | Creates the Group viewsholder which instantiates the group prefab using the provided params in [!:ScrollRectItemsAdapter8<TParams, TItemViewsHolder>.Init(TParams)] (Overrides SRIATParams, TItemViewsHolderCreateViewsHolder(Int32).) | |
| GetCellGroupsCount | ||
| GetCellViewsHolder | Retrieve the views holder of a cell with speciffic index in view. For example, one can iterate from 0 to GetNumVisibleCells in order to do something with each visible cell. Not to be mistaken for GetCellViewsHolderIfVisible(Int32), which retrieves a cell by the index of its corresponding model in your data list (ItemIndex) | |
| GetCellViewsHolderIfVisible | Retrieve the views holder of a cell whose associated model's index in your data list is withCellItemIndex. Not to be mistaken for GetCellViewsHolder(Int32) which retrieves a cell by its index _VisibleItems | |
| GetItemHeight | (Overrides ScrollRectItemsAdapter8TParams, TItemViewsHolderGetItemHeight(Int32).) | |
| GetItemsCount | Overriding base's implementation to return the cells count, instead of the groups count (Overrides SRIATParams, TItemViewsHolderGetItemsCount.) | |
| GetItemWidth | (Overrides ScrollRectItemsAdapter8TParams, TItemViewsHolderGetItemWidth(Int32).) | |
| GetNumVisibleCells | The number of visible cells | |
| GetViewsHolderOfClosestItemToViewportPoint |
Tha base implementation finds the group. Here, we're narrowing the search in the group iself in order to return the CellViewsHolder
(Overrides SRIATParams, TItemViewsHolderGetViewsHolderOfClosestItemToViewportPoint(Single, Single, Single).) | |
| InitOrUpdateItemViewHolder | (Overrides ScrollRectItemsAdapter8TParams, TItemViewsHolderInitOrUpdateItemViewHolder(TItemViewsHolder).) | |
| InsertItems | Not currently implemented fir GridAdapters (Overrides SRIATParams, TItemViewsHolderInsertItems(Int32, Int32, Boolean, Boolean).) | |
| OnBeforeRecycleOrDisableCellViewsHolder | The only important callback for inheritors. It provides cell's views holder which has just become visible and whose views should be updated from its corresponding data model. viewsHolder.ItemIndex(ItemIndex) can be used to know what data model is associated with. | |
| OnBeforeRecycleOrDisableViewsHolder |
Overridden in order to call OnBeforeRecycleOrDisableCellViewsHolder(TCellVH, Int32) for each active cell in the group
(Overrides SRIATParams, TItemViewsHolderOnBeforeRecycleOrDisableViewsHolder(TItemViewsHolder, Int32).) | |
| Refresh | Overriding base's implementation so that we pass the cells count to our own implementation which converts them to group count before further passing it to the base impl. (Overrides SRIATParams, TItemViewsHolderRefresh.) | |
| Refresh(Boolean, Boolean) | See Refresh | |
| RemoveItems | Not currently implemented fir GridAdapters (Overrides SRIATParams, TItemViewsHolderRemoveItems(Int32, Int32, Boolean, Boolean).) | |
| ScrollTo | Scrolls to the specified cell. Use ScrollToGroup(Int32, Single, Single) if that was intended instead (Overrides SRIATParams, TItemViewsHolderScrollTo(Int32, Single, Single).) | |
| ScrollToGroup | Scroll to the specified GROUP. Use ScrollTo(Int32, Single, Single) if scrolling to a CELL was intended instead | |
| SmoothScrollTo | Scrolls to the specified cell. Use [!:SmoothScrollToGroup(int, float, float, float, Func<float, bool>)] if that was intended instead (Overrides SRIATParams, TItemViewsHolderSmoothScrollTo(Int32, Single, Single, Single, FuncSingle, Boolean, Boolean).) | |
| SmoothScrollToGroup | ||
| UpdateCellViewHolder | ||
| UpdateCellViewsHolder | The only important callback for inheritors. It provides cell's views holder which has just become visible and whose views should be updated from its corresponding data model. viewsHolder.ItemIndex(ItemIndex) can be used to know what data model is associated with. | |
| UpdateViewsHolder | Here the grid adapter checks if new groups need to be created or if old ones need to be disabled or destroyed, after which it calls UpdateCellViewsHolder(TCellVH) for each remaining cells (Overrides SRIATParams, TItemViewsHolderUpdateViewsHolder(TItemViewsHolder).) |