class
ListView
Inherits from UnityEngine.MonoBehaviour
Creates a virtualized, scrollable list of ItemView prefabs from a user-provided data source.
Properties
DataSourceItemCount | The size of the underlying data source. Will return |
MaxLoadedIndex | The highest index into the data source mapped to a list item that's currently loaded into view. |
MinLoadedIndex | The lowest index into the data source mapped to a list item that's currently loaded into view. |
OutOfViewDistance | The distance a list item must be out of view before it's removed and added back into the list item pool. |
UIBlock | The parent UIBlock of all the list items. Attached to |
Methods
AddDataBinder | Subscribe to an indexed Data.OnBind<TData> event on this ListView's set of list items |
AddDataUnbinder | Subscribe to an indexed Data.OnUnbind<TData> event on this ListView's set of list items |
AddGestureHandler | Subscribe to an indexed IGestureEvent event on this ListView's set of list items |
AddPrefabProvider | Register a PrefabProviderCallback<T> for a particular data type in the data source, |
GetDataSource | Retrieve the underlying data source, previously assigned via SetDataSource<T>(IList<T>). |
JumpToIndex | Jumps the ListView to the item at the given index. |
JumpToIndexPage | Jumps the ListView to the virtualized page of the item at the given index |
Rebind | Reprocesses the object at index |
Refresh | Synchronizes the items in view with the content of the underlying data source, previously assigned via SetDataSource<T>(IList<T>). |
Relayout | The ListView will pull more content into view and page content out of view as it's scrolled, but it doesn't automatically check for external |
RemoveDataBinder | Unsubscribe from an indexed Data.OnBind<TData> event previously subscribed to via AddDataBinder<TData, TVisuals>(UIEventHandler<Data.OnBind<TData>, TVisuals, Int32>) |
RemoveDataUnbinder | Unsubscribe from an indexed Data.OnUnbind<TData> event previously subscribed to via AddDataUnbinder<TData, TVisuals>(UIEventHandler<Data.OnUnbind<TData>, TVisuals, Int32>) |
RemoveGestureHandler | Unsubscribe from a gesture event previously subscribed to via AddGestureHandler<TEvent, TVisuals>(UIEventHandler<TEvent, TVisuals, Int32>) |
RemovePrefabProvider | Unregister a PrefabProviderCallback<T> that was previously registered via AddPrefabProvider<TData>(PrefabProviderCallback<Int32>) |
Scroll | Scrolls the list content by the provided |
SetDataSource | Set the underlying data source. This instructs the list to start creating a 1-to-1 mapping of objects in the data source to ListView list items. |
TryDetach (2 overloads) |
|
TryGetItemView | Attempts to retrieve the ItemView in view representing the object in the data source at the provided index, |
TryGetSourceIndex | Attempts to retrieve the index into the data source, |
TryReattach | If a list item was previously detached from the ListView (via TryDetach(ItemView, Transform)),
this is a way to transfer ownership of |
Events
OnScrolledPastEnd | Invoked when the list is scrolled beyond the last list element. Provides the distance between the edge of content and edge of the viewport. |
OnScrolledPastStart | Invoked when the list is scrolled beyond the first list element. Provides the distance between the edge of content and edge of the viewport. |