Click or drag to resize

OSATParams, TItemViewsHolderCollectItemsSizes Method

This is called during changing the items count. The base implementation reinitializes the items descriptor so that all items will have the same size, specified in DefaultItemSize If overriding the method and the item default size should remain the same as DefaultItemSize, don't forget to call the base implementation! Otherwise, call ReinitializeSizes(ItemCountChangeMode, Int32, Int32, NullableDouble) with the new default size as parameter. Use BeginChangingItemsSizes(Int32) before and EndChangingItemsSizes after setting sizes. The indices of items for which you set custom sizes must be one after another (4,5,6,7.. etc). Gaps are not allowed. Use "itemsDesc[itemIndexInView] = size" syntax for setting custom sizes. In this call, ItemIndex will be the same as itemIndexInView, even if looping is enabled.

Namespace:  Com.ForbiddenByte.OSA.Core
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
protected virtual void CollectItemsSizes(
	ItemCountChangeMode changeMode,
	int count,
	int indexIfInsertingOrRemoving,
	ItemsDescriptor itemsDesc
)

Parameters

changeMode
Type: Com.ForbiddenByte.OSA.CoreItemCountChangeMode
count
Type: SystemInt32
indexIfInsertingOrRemoving
Type: SystemInt32
itemsDesc
Type: Com.ForbiddenByte.OSA.CoreItemsDescriptor
The container for all the info related to items' sizes
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also