Click or drag to resize

SelectAndDeleteExample Class

Implementation demonstrating the usage of a GridAdapterTParams, TCellVH with support for selecting items on long click and deleting them with a nice collapse animation
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          Com.ForbiddenByte.OSA.CoreOSAMyGridParams, CellGroupViewsHolderMyCellViewsHolder
            Com.ForbiddenByte.OSA.CustomAdapters.GridViewGridAdapterMyGridParams, MyCellViewsHolder
              Com.ForbiddenByte.OSA.Demos.SelectAndDeleteSelectAndDeleteExample

Namespace:  Com.ForbiddenByte.OSA.Demos.SelectAndDelete
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class SelectAndDeleteExample : GridAdapter<MyGridParams, MyCellViewsHolder>, 
	LongClickableItemIItemLongClickListener, ExpandCollapseOnClickISizeChangesHandler

The SelectAndDeleteExample type exposes the following members.

Constructors
  NameDescription
Public methodSelectAndDeleteExample
Top
Properties
  NameDescription
Public propertyCurrentFreeID
Public propertyLazyData
Top
Methods
  NameDescription
Public methodChangeItemsCount
Overridden in order to convert the cellsCount to groupsCount before passing it to the base's implementation
(Overrides GridAdapterTParams, TCellVHChangeItemsCount(ItemCountChangeMode, Int32, Int32, Boolean, Boolean).)
Protected methodCreateViewsHolder
Creates the Group viewsholder which instantiates the group prefab using the provided params in Init
(Overrides GridAdapterTParams, TCellVHCreateViewsHolder(Int32).)
Public methodHandleSizeChangeRequest
Protected methodOnBeforeRecycleOrDisableCellViewsHolder
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.
(Overrides GridAdapterTParams, TCellVHOnBeforeRecycleOrDisableCellViewsHolder(TCellVH, Int32).)
Public methodOnExpandedStateChanged
Public methodOnItemLongClicked
Public methodRefresh (Overrides GridAdapterTParams, TCellVHRefresh(Boolean, Boolean).)
Protected methodStart (Overrides OSATParams, TItemViewsHolderStart.)
Protected methodUpdate (Overrides OSATParams, TItemViewsHolderUpdate.)
Protected methodUpdateCellViewsHolder
Called when a cell becomes visible
(Overrides GridAdapterTParams, TCellVHUpdateCellViewsHolder(TCellVH).)
Top
Events
  NameDescription
Public eventSelectionModeChanged
Top
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also