Classes
ListView
ListView
Represents a view that shows items in a vertically scrolling list.
Summary
Constructors
Properties
- android
- ios
- iosEstimatedRowHeight
- itemIdGenerator
- itemLoadingEvent
- items
- itemTapEvent
- itemTemplate
- itemTemplates
- itemTemplateSelector
- loadMoreItemsEvent
- rowHeight
- separatorColor
152 properties inherited from View
Click to expand
Methods
111 methods inherited from View
Click to expand
Constructors
Properties
android
Gets the native [android widget](http://developer.android.com/reference/android/widget/ListView.html) that represents the user interface for this component. Valid only when running on Android OS.
ios
Gets the native [iOS view](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableView_Class/) that represents the user interface for this component. Valid only when running on iOS.
iosEstimatedRowHeight
iosEstimatedRowHeight: LengthType
Gets or set the estimated height of rows in the ListView.
The default value is 44px.
itemIdGenerator
itemTemplateSelector
A function that returns the appropriate ket template based on the data item.
itemTemplates
itemTemplates: string | KeyedTemplate[]
Gets or set the list of item templates for the item template selector
items
items: any[] | ItemsSource
Gets or set the items collection of the ListView.
The items property can be set to an array or an object defining length and getItem(index) method.
rowHeight
rowHeight: LengthType
Gets or set row height of the ListView.
itemLoadingEvent
Static
String value used when hooking to itemLoading event.
itemTapEvent
Static
String value used when hooking to itemTap event.
loadMoreItemsEvent
Static
String value used when hooking to loadMoreItems event.
Methods
isItemAtIndexVisible
Checks if Specified item with index is visible.
Parameter | Default | Description |
index |
| number Item index. |
Returns boolean
on
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter | Default | Description |
eventNames |
| string String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change"). |
callback |
| (data: EventData) => void Callback function which will be executed when event is raised. |
thisArg |
| any An optional parameter which will be used as `this` context for callback execution. |
Returns void
on(event: "itemLoading", callback: (args: ItemEventData) => void, thisArg?: any): void
Raised when a View for the data at the specified index should be created.
The result should be returned trough the view property of the event data.
Note, that the view property of the event data can be pre-initialized with
an old instance of a view, so that it can be reused.
Parameter | Default | Description |
event |
| "itemLoading" |
callback |
| (args: ItemEventData) => void |
thisArg |
| any |
Returns void
on(event: "itemTap", callback: (args: ItemEventData) => void, thisArg?: any): void
Raised when an item inside the ListView is tapped.
Parameter | Default | Description |
event |
| "itemTap" |
callback |
| (args: ItemEventData) => void |
thisArg |
| any |
Returns void
refresh
Forces the ListView to reload all its items.
Returns any
scrollToIndex
Scrolls the specified item with index into view.
[iOS](https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITableView_Class/#//apple_ref/occ/instm/UITableView/scrollToRowAtIndexPath:atScrollPosition:animated:)
[Android](http://developer.android.com/reference/android/widget/ListView.html#setSelection(int))
Parameter | Default | Description |
index |
| number Item index. |
Returns any
scrollToIndexAnimated
Scrolls the specified item with index into view with animation.
[iOS](https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITableView_Class/#//apple_ref/occ/instm/UITableView/scrollToRowAtIndexPath:atScrollPosition:animated:)
[Android](https://developer.android.com/reference/android/widget/ListView.html#smoothScrollToPosition(int))
Parameter | Default | Description |
index |
| number Item index. |
Returns any
- Previous
- ListPicker
- Next
- ModalTransition