Click or drag to resize

Com.ForbiddenByte.OSA.Demos.ContentSizeFitter Namespace

 
Classes
  ClassDescription
Public classContentSizeFitterExample

The prefabhas a disabled ContentSizeFitter added, which will be enabled in UpdateViewsHolder(MyItemViewsHolder)

if the size was not already calculated (in a previous call), then ScheduleComputeVisibilityTwinPass(Boolean) should be called.

After that, as soon as UpdateViewsHolder(MyItemViewsHolder) was called for all visible items, you'll receive a callback to OnItemHeightChangedPreTwinPass(TItemViewsHolder)

(or OnItemWidthChangedPreTwinPass(TItemViewsHolder) for horizontal ScrollRects) for each of them,

where you can disable the content size fitter.

A "Twin" ComputeVisibility(Double) pass is executed after the current one has finished (meaning UpdateViewsHolder(MyItemViewsHolder) was called for all visible items).

Public classContentSizeFitterSceneEntry
Hookup between the DrawerCommandPanel and the adapter to isolate example code from demo-ing and navigation code
Public classExampleItemModel
Public classMyItemViewsHolder
The ContentSizeFitter should be attached to the item itself
Public classMyParams