Click or drag to resize

CAbstractViewsHolder Class

Class representing the concept of a Views Holder, i.e. a class that references some views and the id of the data displayed by those views. Usually, the root and its child views, once created, don't change, but ItemIndex does, after which the views will change their data.
Inheritance Hierarchy

Namespace:  Com.ForbiddenByte.OSA.Classic
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public abstract class CAbstractViewsHolder

The CAbstractViewsHolder type exposes the following members.

Constructors
  NameDescription
Protected methodCAbstractViewsHolder
Top
Properties
  NameDescription
Public propertyItemIndex
The index of the data model from which this viewsholder's views take their display information
Top
Methods
  NameDescription
Public methodCollectViews
If instead of calling Init(GameObject, Int32, Boolean, Boolean), the initializaton is done manually, this should be called lastly as part of the initialization phase
Public methodInit(GameObject, Int32, Boolean, Boolean)
Instantiates rootPrefabGO, assigns it to root and sets its itemIndex to itemIndex. Activates the new instance if activateRootGameObject is true. Also calls CollectViews if callCollectViews is true
Public methodInit(RectTransform, Int32, Boolean, Boolean)
Public methodMarkForRebuild
Make sure to override this when you have children layouts (for example, a [Vertical/Horizontal/Grid]LayoutGroup) and call MarkLayoutForRebuild(RectTransform) for them. Base's implementation should still be called!
Top
Fields
  NameDescription
Public fieldroot
The root of the view instance (which contains the actual views)
Top
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also