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
- _androidContentDescriptionUpdated
- _automaticallyAdjustsScrollViewInsets
- _closeModalCallback
- _context
- _cssState
- _defaultPaddingBottom
- _defaultPaddingLeft
- _defaultPaddingRight
- _defaultPaddingTop
- _domId
- _ignoreFlexMinWidthHeightReset
- _isAddedToNativeVisualTree
- _isLayoutValid
- _isPaddingRelative
- _isStyleScopeHost
- _oldBottom
- _oldLeft
- _oldRight
- _oldTop
- _styleScope
- _suspendNativeUpdatesCount
- accessibilityBlurEvent
- accessibilityFocusChangedEvent
- accessibilityFocusEvent
- accessibilityHidden
- accessibilityHint
- accessibilityIdentifier
- accessibilityLabel
- accessibilityLanguage
- accessibilityLiveRegion
- accessibilityMediaSession
- accessibilityPerformEscapeEvent
- accessibilityRole
- accessibilityState
- accessibilityValue
- accessible
- alignSelf
- androidDynamicElevationOffset
- androidElevation
- automationText
- background
- backgroundColor
- backgroundImage
- bindingContext
- borderBottomColor
- borderBottomLeftRadius
- borderBottomRightRadius
- borderBottomWidth
- borderColor
- borderLeftColor
- borderLeftWidth
- borderRadius
- borderRightColor
- borderRightWidth
- borderTopColor
- borderTopLeftRadius
- borderTopRightRadius
- borderTopWidth
- borderWidth
- boxShadow
- className
- col
- color
- colSpan
- column
- columnSpan
- createdEvent
- cssClasses
- cssPseudoClasses
- cssType
- disposeNativeViewEvent
- dock
- domNode
- effectiveBorderBottomWidth
- effectiveBorderLeftWidth
- effectiveBorderRightWidth
- effectiveBorderTopWidth
- effectiveHeight
- effectiveLeft
- effectiveMarginBottom
- effectiveMarginLeft
- effectiveMarginRight
- effectiveMarginTop
- effectiveMinHeight
- effectiveMinWidth
- effectivePaddingBottom
- effectivePaddingLeft
- effectivePaddingRight
- effectivePaddingTop
- effectiveTop
- effectiveWidth
- flexGrow
- flexShrink
- flexWrapBefore
- height
- horizontalAlignment
- id
- ignoreTouchAnimation
- iosAccessibilityAdjustsFontSize
- iosAccessibilityMaxFontScale
- iosAccessibilityMinFontScale
- iosIgnoreSafeArea
- iosOverflowSafeArea
- iosOverflowSafeAreaEnabled
- isCollapsed
- isEnabled
- isLayoutValid
- isUserInteractionEnabled
- layoutChangedEvent
- left
- loadedEvent
- margin
- marginBottom
- marginLeft
- marginRight
- marginTop
- minHeight
- minWidth
- modal
- nativeViewProtected
- opacity
- order
- originX
- originY
- parent
- perspective
- propertyChangeEvent
- recycleNativeView
- reusable
- rotate
- rotateX
- rotateY
- row
- rowSpan
- scaleX
- scaleY
- sharedTransitionIgnore
- sharedTransitionTag
- showingModallyEvent
- shownModallyEvent
- testID
- top
- touchAnimation
- touchDelay
- transitionId
- translateX
- translateY
- unloadedEvent
- verticalAlignment
- viewController
- visibility
- width
Methods
111 methods inherited from View
Click to expand
- _addView
- _addViewCore
- _addViewToNativeVisualTree
- _applyXmlAttribute
- _batchUpdate
- _childIndexToNativeChildIndex
- _closeAllModalViewsInternal
- _createPropertyChangeData
- _dialogClosed
- _eachLayoutView
- _emit
- _getNativeViewsCount
- _getRootModalViews
- _getValue
- _handleLivesync
- _hasAncestorView
- _hideNativeModalView
- _inheritStyleScope
- _layoutParent
- _observe
- _onAttachedToWindow
- _onDetachedFromWindow
- _onRootViewReset
- _onSizeChanged
- _parentChanged
- _raiseLayoutChangedEvent
- _raiseShowingModallyEvent
- _raiseShownModallyEvent
- _removeView
- _removeViewCore
- _removeViewFromNativeVisualTree
- _resumeNativeUpdates
- _setupAsRootView
- _setupUI
- _setValue
- _shouldDelayLayout
- _showNativeModalView
- _suspendNativeUpdates
- _tearDownUI
- _updateStyleScope
- accessibilityAnnouncement
- accessibilityScreenChanged
- addEventListener
- addEventListener
- addPseudoClass
- animate
- bind
- callLoaded
- callUnloaded
- closeModal
- combineMeasuredStates
- createAnimation
- createNativeView
- deletePseudoClass
- destroyNode
- disposeNativeView
- eachChild
- eachChildView
- ensureDomNode
- focus
- get
- getActualSize
- getGestureObservers
- getLocationInWindow
- getLocationOnScreen
- getLocationRelativeTo
- getMeasuredHeight
- getMeasuredState
- getMeasuredWidth
- getSafeAreaInsets
- getViewByDomId
- getViewById
- hasGestureObservers
- hasListeners
- initNativeView
- layout
- layoutChild
- layoutNativeView
- loadView
- measure
- measureChild
- notify
- notifyPropertyChange
- off
- off
- on
- onBackPressed
- once
- once
- onLayout
- onLoaded
- onMeasure
- onResumeNativeUpdates
- onUnloaded
- removeEventListener
- removeEventListener
- requestLayout
- resetNativeView
- resolveSizeAndState
- sendAccessibilityEvent
- set
- setInlineStyle
- setMeasuredDimension
- setNativeView
- setOnTouchListener
- setProperty
- setTestID
- showModal
- toString
- unbind
- unloadView
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.
separatorColor β
separatorColor: Color
Gets or set the items separator line color 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").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.
Returns void
on(event: "loadMoreItems", callback: (args: EventData) => void, thisArg?: any): void
Raised when the ListView is scrolled so that its last item is visible.
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
On this page