Click or drag to resize

SelectionExample 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
          frame8.Logic.Misc.Visual.UI.ScrollRectItemsAdapterSRIAMyGridParams, CellGroupViewsHolderMyCellViewsHolder
            frame8.ScrollRectItemsAdapter.Util.GridViewGridAdapterMyGridParams, MyCellViewsHolder
              frame8.ScrollRectItemsAdapter.SelectionExampleSelectionExample

Namespace:  frame8.ScrollRectItemsAdapter.SelectionExample
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class SelectionExample : GridAdapter<MyGridParams, MyCellViewsHolder>, 
	LongClickableItemIItemLongClickListener, ExpandCollapseOnClickISizeChangesHandler

The SelectionExample type exposes the following members.

Constructors
  NameDescription
Public methodSelectionExample
Top
Methods
  NameDescription
Protected methodAwake (Overrides GridAdapterTParams, TCellVHAwake.)
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 SRIATParams, TItemViewsHolderStart.)
Protected methodUpdate (Overrides SRIATParams, TItemViewsHolderUpdate.)
Protected methodUpdateCellViewsHolder
Called when a cell becomes visible
(Overrides GridAdapterTParams, TCellVHUpdateCellViewsHolder(TCellVH).)
Top
Version Information

Optimized ScrollView Adapter

Supported in: 4.0, 3.0
See Also