Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RadListView

This class represents the RadListView component. RadListView is based on the already familiar native Android and iOS components from Progress Telerik UI for Android and Progress Telerik UI for iOS. The component exposes all major features supported by the native controls through a unified API suitable for NativeScript developers.

Hierarchy

  • View

Index

Constructors

Properties

Methods

Constructors

constructor

  • Please note that should you be using the new Observable({}) constructor, it is obsolete since v3.0, and you have to migrate to the "data/observable" fromObject({}) or the fromObjectRecursive({}) functions.

    Returns RadListView

Properties

_context

_context: any

_cssState

_cssState: any

_domId

_domId: number

_hasGroupingFunctionChanged

_hasGroupingFunctionChanged: boolean

_isAddedToNativeVisualTree

_isAddedToNativeVisualTree: boolean

alignSelf

alignSelf: AlignSelf

android

android: any

The native 'android.widget.FrameLayout' object.

androidListView

androidListView: any

The native 'com.telerik.widget.list.RadListView' object.

automationText

automationText: string

Gets or sets the automation text of the view.

background

background: string

Gets or sets the background style property.

backgroundColor

backgroundColor: string | Color

Gets or sets the background color of the view.

backgroundImage

backgroundImage: string | LinearGradient

Gets or sets the background image of the view.

bindingContext

bindingContext: any

Gets or sets the binding context of this instance. This object is used as a source for each Binding that does not have a source object specified.

borderBottomColor

borderBottomColor: Color

Gets or sets the bottom border color of the view.

borderBottomLeftRadius

borderBottomLeftRadius: Length

Gets or sets the bottom left border radius of the view.

borderBottomRightRadius

borderBottomRightRadius: Length

Gets or sets the bottom right border radius of the view.

borderBottomWidth

borderBottomWidth: Length

Gets or sets the bottom border width of the view.

borderColor

borderColor: string | Color

Gets or sets the border color of the view.

borderLeftColor

borderLeftColor: Color

Gets or sets the left border color of the view.

borderLeftWidth

borderLeftWidth: Length

Gets or sets the left border width of the view.

borderRadius

borderRadius: string | Length

Gets or sets the border radius of the view.

borderRightColor

borderRightColor: Color

Gets or sets the right border color of the view.

borderRightWidth

borderRightWidth: Length

Gets or sets the right border width of the view.

borderTopColor

borderTopColor: Color

Gets or sets the top border color of the view.

borderTopLeftRadius

borderTopLeftRadius: Length

Gets or sets the top left border radius of the view.

borderTopRightRadius

borderTopRightRadius: Length

Gets or sets the top right border radius of the view.

borderTopWidth

borderTopWidth: Length

Gets or sets the top border width of the view.

borderWidth

borderWidth: string | Length

Gets or sets the border width of the view.

className

className: string

Gets or sets the CSS class name for this view.

col

col: number

colSpan

colSpan: number

color

color: Color

Gets or sets the color of the view.

Private css

css: string

cssClasses

cssClasses: Set<string>

cssPseudoClasses

cssPseudoClasses: Set<string>

cssType

cssType: string

Gets the CSS fully qualified type name. Using this as element type should allow for PascalCase and kebap-case selectors, when fully qualified, to match the element.

dock

dock: "left" | "top" | "right" | "bottom"

domNode

domNode: DOMNode

effectiveBorderBottomWidth

effectiveBorderBottomWidth: number

effectiveBorderLeftWidth

effectiveBorderLeftWidth: number

effectiveBorderRightWidth

effectiveBorderRightWidth: number

effectiveBorderTopWidth

effectiveBorderTopWidth: number

effectiveHeight

effectiveHeight: number

effectiveLeft

effectiveLeft: number

effectiveMarginBottom

effectiveMarginBottom: number

effectiveMarginLeft

effectiveMarginLeft: number

effectiveMarginRight

effectiveMarginRight: number

effectiveMarginTop

effectiveMarginTop: number

effectiveMinHeight

effectiveMinHeight: number

effectiveMinWidth

effectiveMinWidth: number

effectivePaddingBottom

effectivePaddingBottom: number

effectivePaddingLeft

effectivePaddingLeft: number

effectivePaddingRight

effectivePaddingRight: number

effectivePaddingTop

effectivePaddingTop: number

effectiveTop

effectiveTop: number

effectiveWidth

effectiveWidth: number

enableCollapsibleGroups

enableCollapsibleGroups: boolean

Gets or sets a value indicating if the collapse/expand grouping functionality of the RadListView is enabled.

filteringFunction

filteringFunction: function

Gets or sets a function that will be called to filter the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any): boolean
    • Parameters

      • item: any

      Returns boolean

flexGrow

flexGrow: FlexGrow

flexShrink

flexShrink: FlexShrink

flexWrapBefore

flexWrapBefore: FlexWrapBefore

footerItemTemplate

footerItemTemplate: string

Gets or sets the template used to visualize a footer in the list.

groupTemplate

groupTemplate: string

Gets or sets the UI template for list view groups.

groupingFunction

groupingFunction: function

Gets or sets a function that will be called to group the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any): any
    • Parameters

      • item: any

      Returns any

headerItemTemplate

headerItemTemplate: string

Gets or sets the template used to visualize a header in the list.

height

height: PercentLength

Gets or sets the desired height of the view.

horizontalAlignment

horizontalAlignment: HorizontalAlignment

Gets or sets the alignment of this view within its parent along the Horizontal axis.

id

id: string

Gets or sets the id for this view.

ios

ios: any

Gets the ios-specific native instance that lies behind this proxy. Will be available if running on an iOS platform.

iosOverflowSafeArea

iosOverflowSafeArea: boolean

Instruct container view to expand beyond the safe area. This property is iOS specific. Default value: false

iosOverflowSafeAreaEnabled

iosOverflowSafeAreaEnabled: boolean

Enables or disables the iosOverflowSafeArea property for all children. This property is iOS specific. Default value: true

isCollapsed

isCollapsed: boolean

Returns true if visibility is set to 'collapse'. Readonly property

isEnabled

isEnabled: boolean

Gets or sets a value indicating whether the the view is enabled. This affects the appearance of the view.

isLayoutValid

isLayoutValid: boolean

Gets is layout is valid. This is a read-only property.

isLoaded

isLoaded: boolean

isUserInteractionEnabled

isUserInteractionEnabled: boolean

Gets or sets a value indicating whether the user can interact with the view. This does not affect the appearance of the view.

itemReorder

itemReorder: boolean

Gets or sets a boolean value determining whether reordering items is enabled or not.

itemSwipe

itemSwipe: boolean

[@deprecated: Please use the 'swipeActions' instead].

itemSwipeTemplate

itemSwipeTemplate: string

Gets or sets the UI template for the background view of an item shown on during swipe.

itemTemplate

itemTemplate: string

Gets or sets the UI template for list view items.

itemTemplateSelector

itemTemplateSelector: string | function

A function that returns the appropriate key that represents the template based on the data item.

itemTemplates

itemTemplates: string | Array<KeyedTemplate>

Gets or sets the UI templates for list view items.

itemViewDisposer

itemViewDisposer: function

Used internally inside the Angular directives Called when the refresh function is called.

Type declaration

    • (): void
    • Returns void

itemViewLoader

itemViewLoader: function

Used internally inside the Angular directives Gets or sets the item view loaded used by the @link RadListView} when creating its item views.

Type declaration

    • (viewType: any): View
    • Parameters

      • viewType: any

      Returns View

items

items: any

Gets or sets the source collection used to populate the RadListView.

left

left: Length

listViewLayout

listViewLayout: ListViewLayoutBase

The layout object used to arrange items.

loadOnDemandBufferSize

loadOnDemandBufferSize: number

Gets or sets a number determining the amount of items remaining between the current scrolling position and the end which, when exceeded, will trigger a loadMoreDataRequestedEvent. Default value: on iOS: '5', on Android: '10'

loadOnDemandMode

loadOnDemandMode: ListViewLoadOnDemandMode

Gets or sets a value from the ListViewLoadOnDemandMode list determining the currently active load-on-demand mode.

margin

margin: string | PercentLength

Gets or sets margin style property.

marginBottom

marginBottom: PercentLength

Specifies extra space on the bottom side of this view.

marginLeft

marginLeft: PercentLength

Specifies extra space on the left side of this view.

marginRight

marginRight: PercentLength

Specifies extra space on the right side of this view.

marginTop

marginTop: PercentLength

Specifies extra space on the top side of this view.

minHeight

minHeight: Length

Gets or sets the minimum height the view may grow to.

minWidth

minWidth: Length

Gets or sets the minimum width the view may grow to.

modal

modal: View

Returns the current modal view that this page is showing (is parent of), if any.

multipleSelection

multipleSelection: boolean

Gets or sets a boolean value determining whether multiple selection is enabled or not.

nativeScriptViewAdded

nativeScriptViewAdded: function

Used internally inside the Angular directives Called when the wrapper StackLayout of the itemTemplate is added to the RadListView.

Type declaration

    • (parent: View, child: View): void
    • Parameters

      • parent: View
      • child: View

      Returns void

nativeView

nativeView: any

nativeViewProtected

nativeViewProtected: any

read-only. If you want to set out-of-band the nativeView use the setNativeView method.

opacity

opacity: number

Gets or sets the opacity style property.

order

order: Order

originX

originX: number

Gets or sets the X component of the origin point around which the view will be transformed. The deafault value is 0.5 representing the center of the view.

originY

originY: number

Gets or sets the Y component of the origin point around which the view will be transformed. The deafault value is 0.5 representing the center of the view.

page

page: Page

Gets owner page. This is a read-only property.

parent

parent: ViewBase

Gets the parent view. This property is read-only.

parentNode

parentNode: ViewBase

Gets the template parent or the native parent. Sets the template parent.

pullToRefresh

pullToRefresh: boolean

Gets or sets a boolean value determining whether the user is able to perform the pull-to-refresh gesture.

pullToRefreshStyle

pullToRefreshStyle: PullToRefreshStyle

Gets or sets an instance of the PullToRefreshStyle class used to style the Pull-to-Refresh indicator.

reorderMode

reorderMode: ListViewReorderMode

Gets or sets a value from the ListViewReorderMode enum determining whether item reorder will happen on hold and drag or simply drag.

rotate

rotate: number

Gets or sets the rotate affine transform of the view.

row

row: number

rowSpan

rowSpan: number

scaleX

scaleX: number

Gets or sets the scaleX affine transform of the view.

scaleY

scaleY: number

Gets or sets the scaleY affine transform of the view.

scrollPosition

scrollPosition: ListViewScrollPosition

Gets or sets the scroll position used by the 'scrollToIndex()' function. Available on iOS only.

selectionBehavior

selectionBehavior: ListViewSelectionBehavior

Gets or sets a value from the ListViewSelectionBehavior list determining whether items are selected on press, long press, or can't be selected at all.

sortingFunction

sortingFunction: function

Gets or sets a function that will be called to sort the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any, otherItem: any): number
    • Parameters

      • item: any
      • otherItem: any

      Returns number

style

style: Style

Gets the style object associated to this view.

swipeActions

swipeActions: boolean

Gets or sets a boolean value determining whether the user is able to swipe items or not.

top

top: Length

translateX

translateX: dip

Gets or sets the translateX affine transform of the view in device independent pixels.

translateY

translateY: dip

Gets or sets the translateY affine transform of the view in device independent pixels.

typeName

typeName: string

Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".

verticalAlignment

verticalAlignment: VerticalAlignment

Gets or sets the alignment of this view within its parent along the Vertical axis.

viewController

viewController: any

returns the native UIViewController.

visibility

visibility: Visibility

Gets or sets the visibility of the view.

width

width: PercentLength

Gets or sets the desired width of the view.

Static dataPopulatedEvent

dataPopulatedEvent: string

This event is raised when the RadListView has populated an object from its 'items' collection.

Static enableCollapsibleGroupsProperty

enableCollapsibleGroupsProperty: Property<RadListView, boolean>

Identifies the enableCollapsibleGroups dependency property. NOTE: This feature is not supported on iOS

Static filteringFunctionProperty

filteringFunctionProperty: Property<RadListView, function>

Identifies the filteringFunction dependency property.

Static footerItemTemplateProperty

footerItemTemplateProperty: Property<RadListView, string>

Identifies the footerItemTemplate dependency property.

Static groupTemplateProperty

groupTemplateProperty: Property<RadListView, string>

Identifies the groupTemplate dependency property.

Static groupingFunctionProperty

groupingFunctionProperty: Property<RadListView, function>

Identifies the groupingFunction dependency property.

Static headerItemTemplateProperty

headerItemTemplateProperty: Property<RadListView, string>

Identifies the headerItemTemplate dependency property.

Static itemDeselectedEvent

itemDeselectedEvent: string

This event is fired after deselecting an item. The event exposes an instance of the ListViewEventData class.

Static itemDeselectingEvent

itemDeselectingEvent: string

This event is fired before item to be deselected. Return value indicates whether the specified item should be deselected. The event exposes an instance of the ListViewEventData class.

Static itemHoldEvent

itemHoldEvent: string

This event is fired when the user presses and holds an item. The event exposes an instance of the ListViewEventData class.

Static itemLoadingEvent

itemLoadingEvent: string

This event is fired each time an item is about to be visualized by RadListView. The event provides an instance of the ListViewEventData class and exposes the a View instance that represents container to be visualized. It allows for customization of the appearance of a particular item depending on the data object assigned to it.

Static itemReorderProperty

itemReorderProperty: Property<RadListView, boolean>

Identifies the itemReorder dependency property.

Static itemReorderStartedEvent

itemReorderStartedEvent: string

This event is fired when an item is about to be reordered. The event exposes an instance of the ListViewEventData class which contains the items of the item that is about to be reordered.

Static itemReorderStartingEvent

itemReorderStartingEvent: string

This event is fired when the user attempts to reorder an item. It can be used to cancel the reorder procedure. The event exposes an instance of the ListViewEventData class which contains the items of the item that is about to be reordered. Using the {@code returnValue} property of the event arguments you can block or allow the reordering procedure.

Static itemReorderedEvent

itemReorderedEvent: string

This event is fired after reordering an item in list view. The event exposes an instance of the ListViewEventData class which data property which returns an object containing a targetIndex and targetGroupIndex properties depicting the destination of the reordered item.

Static itemSelectedEvent

itemSelectedEvent: string

This event is fired after selecting an item. The event exposes an instance of the ListViewEventData class.

Static itemSelectingEvent

itemSelectingEvent: string

This event is fired before an item to be selected. Return value indicates whether the specified item should be selected. The event exposes an instance of the ListViewEventData class.

Static itemSwipeProgressChangedEvent

itemSwipeProgressChangedEvent: string

This event is continuously fired while the user is swiping an item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property of the arguments exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProgressEndedEvent

itemSwipeProgressEndedEvent: string

This event is fired when the user has finished swiping an item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property of the arguments exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProgressStartedEvent

itemSwipeProgressStartedEvent: string

This event is fired when the user starts swiping a item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProperty

itemSwipeProperty: Property<RadListView, string>

[@deprecated: Please use the 'swipeActions' instead].

Static itemSwipeTemplateProperty

itemSwipeTemplateProperty: Property<RadListView, string>

Identifies the itemSwipeTemplate dependency property.

Static itemSwipingEvent

itemSwipingEvent: string

This event is fired when the user starts swiping a item. The handler of the event receives an instance of the ListViewEventData. The returnValue property of the arguments can be used to cancel the swipe gesture.

Static itemTapEvent

itemTapEvent: string

This event is fired when the user clicks/taps an item. The event exposes an instance of the ListViewEventData class.

Static itemTemplateProperty

itemTemplateProperty: Property<RadListView, string>

Identifies the itemTemplate dependency property.

Static itemsProperty

itemsProperty: Property<RadListView, any>

Identifies the items dependency property.

Static layoutChangedEvent

layoutChangedEvent: string

String value used when hooking to layoutChanged event.

Static listViewLayoutProperty

listViewLayoutProperty: Property<RadListView, ListViewLayoutBase>

Identifies the listViewLayout dependency property.

Static loadMoreDataRequestedEvent

loadMoreDataRequestedEvent: string

Called after the user requested loading more data on demand by scrolling over the item buffer limit size. The event exposes an instance of the ListViewEventData class which returnValue property determines whether more data will be loaded.

Static loadOnDemandBufferSizeProperty

loadOnDemandBufferSizeProperty: Property<RadListView, number>

Identifies the loadOnDemandBufferSize dependency property.

Static loadOnDemandModeProperty

loadOnDemandModeProperty: Property<RadListView, ListViewLoadOnDemandMode>

Identifies the loadOnDemandMode dependency property.

Static loadedEvent

loadedEvent: string

String value used when hooking to loaded event.

Static multipleSelectionProperty

multipleSelectionProperty: Property<RadListView, boolean>

Identifies the multipleSelection dependency property.

Static propertyChangeEvent

propertyChangeEvent: string

String value used when hooking to propertyChange event.

Static pullToRefreshInitiatedEvent

pullToRefreshInitiatedEvent: string

Called after the user requested loading more data by pulling down the list. The event exposes an instance of the ListViewEventData class which returnValue property determines whether more data will be loaded.

Static pullToRefreshProperty

pullToRefreshProperty: Property<RadListView, boolean>

Identifies the pullToRefresh dependency property.

Static pullToRefreshStyleProperty

pullToRefreshStyleProperty: Property<RadListView, PullToRefreshStyle>

Identifies the pullToRefreshStyle dependency property.

Static reorderModeProperty

reorderModeProperty: Property<RadListView, ListViewReorderMode>

Identifies the reorderMode dependency property.

Static scrollDragEndedEvent

scrollDragEndedEvent: string

This event is fired each time the user raises their finger from the device's screen as a result of a scrolling gesture. This event marks the end of a user-interaction sessions related to scrolling the list. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrollEndedEvent

scrollEndedEvent: string

This event is fired each time the list stops scrolling. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrollPositionProperty

scrollPositionProperty: Property<RadListView, ListViewScrollPosition>

Identifies the scrollPosition dependency property. Available on iOS only.

Static scrollStartedEvent

scrollStartedEvent: string

This event is fired each time the list starts scrolling. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrolledEvent

scrolledEvent: string

This event is fired each time the list changes its scroll offset. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static selectionBehaviorProperty

selectionBehaviorProperty: Property<RadListView, ListViewSelectionBehavior>

Identifies the selectionBehavior dependency property.

Static showingModallyEvent

showingModallyEvent: string

String value used when hooking to showingModally event.

Static shownModallyEvent

shownModallyEvent: string

String value used when hooking to shownModally event.

Static sortingFunctionProperty

sortingFunctionProperty: Property<RadListView, function>

Identifies the sortingFunction dependency property.

Static swipeActionsProperty

swipeActionsProperty: Property<RadListView, boolean>

Identifies the swipeActions dependency property.

Static unloadedEvent

unloadedEvent: string

String value used when hooking to unloaded event.

Methods

_addView

  • _addView(view: ViewBase, atIndex?: number): void
  • Parameters

    • view: ViewBase
    • Optional atIndex: number

    Returns void

_addViewCore

  • _addViewCore(view: ViewBase, atIndex?: number): void
  • Method is intended to be overridden by inheritors and used as "protected"

    Parameters

    • view: ViewBase
    • Optional atIndex: number

    Returns void

_addViewToNativeVisualTree

  • _addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean
  • Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.

    Parameters

    • view: ViewBase
    • Optional atIndex: number

    Returns boolean

_applyXmlAttribute

  • _applyXmlAttribute(attribute: any, value: any): boolean
  • This used to be the way to set attribute values in early {N} versions. Now attributes are expected to be set as plain properties on the view instances.

    deprecated

    Parameters

    • attribute: any
    • value: any

    Returns boolean

_childIndexToNativeChildIndex

  • _childIndexToNativeChildIndex(index?: number): number
  • Parameters

    • Optional index: number

    Returns number

_dialogClosed

  • _dialogClosed(): void
  • Method is intended to be overridden by inheritors and used as "protected"

    Returns void

_eachLayoutView

  • _eachLayoutView(callback: function): void
  • Parameters

    • callback: function
        • (View: any): void
        • Parameters

          • View: any

          Returns void

    Returns void

_getNativeViewsCount

  • _getNativeViewsCount(): number
  • Returns number

_getValue

  • _getValue(property: any): never
  • Obsolete: There is a new property system that does not rely on _getValue.

    Parameters

    • property: any

    Returns never

_goToVisualState

  • _goToVisualState(state: string): void
  • Parameters

    • state: string

    Returns void

Private _onCssStateChange

  • _onCssStateChange(): void
  • Returns void

_onRootViewReset

  • _onRootViewReset(): void
  • Method is intended to be overridden by inheritors and used as "protected"

    Returns void

_parentChanged

  • _parentChanged(oldParent: ViewBase): void
  • Parameters

    • oldParent: ViewBase

    Returns void

_removeView

  • _removeView(view: ViewBase): void
  • Parameters

    • view: ViewBase

    Returns void

_removeViewCore

  • _removeViewCore(view: ViewBase): void
  • Method is intended to be overridden by inheritors and used as "protected"

    Parameters

    • view: ViewBase

    Returns void

_removeViewFromNativeVisualTree

  • _removeViewFromNativeVisualTree(view: ViewBase): void
  • Parameters

    • view: ViewBase

    Returns void

_setValue

  • _setValue(property: any, value: any): never
  • Obsolete: There is a new property system that does not rely on _setValue.

    Parameters

    • property: any
    • value: any

    Returns never

_setupUI

  • _setupUI(context: any, atIndex?: number): void
  • Setups the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

    Parameters

    • context: any
    • Optional atIndex: number

    Returns void

_tearDownUI

  • _tearDownUI(force?: boolean): void
  • Tears down the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

    Parameters

    • Optional force: boolean

    Returns void

Private addCss

  • addCss(cssString: string): void
  • Parameters

    • cssString: string

      A valid css which will be added to current css.

    Returns void

Private addCssFile

  • addCssFile(cssFileName: string): void
  • Parameters

    • cssFileName: string

      A valid file name (from the application root) which contains a valid css.

    Returns void

addEventListener

  • addEventListener(eventNames: string, callback: function, thisArg?: any): any
  • Adds a listener for the specified event name.

    Parameters

    • eventNames: string

      Comma delimited names of the events to attach the listener to.

    • callback: function

      A function to be called when some of the specified event(s) is raised.

        • (data: EventData): void
        • Parameters

          • data: EventData

          Returns void

    • Optional thisArg: any

      An optional parameter which when set will be used as "this" in callback method call.

    Returns any

Protected addPseudoClass

  • addPseudoClass(name: string): void
  • unstable

    A widget can call this method to add a matching css pseudo class.

    Parameters

    • name: string

    Returns void

animate

  • animate(options: AnimationDefinition): AnimationPromise
  • Animates one or more properties of the view based on the supplied options.

    Parameters

    • options: AnimationDefinition

    Returns AnimationPromise

bind

  • bind(options: BindingOptions, source?: Object): void
  • Parameters

    • options: BindingOptions
    • Optional source: Object

    Returns void

closeModal

  • closeModal(context?: any): void
  • Closes the current modal view that this page is showing.

    Parameters

    • Optional context: any

      Any context you want to pass back to the host when closing the modal view.

    Returns void

createAnimation

  • createAnimation(options: AnimationDefinition): Animation
  • Creates an Animation object based on the supplied options.

    Parameters

    • options: AnimationDefinition

    Returns Animation

createNativeView

  • createNativeView(): Object
  • Creates a native view. Returns either android.view.View or UIView.

    Returns Object

Protected deletePseudoClass

  • deletePseudoClass(name: string): void
  • unstable

    A widget can call this method to discard matching css pseudo class.

    Parameters

    • name: string

    Returns void

deselectAll

  • deselectAll(): void

deselectItemAt

  • deselectItemAt(index: number): any

disposeNativeView

  • disposeNativeView(): void
  • Clean up references to the native view.

    Returns void

eachChild

  • eachChild(callback: function): void
  • Iterates over children of type ViewBase.

    Parameters

    • callback: function

      Called for each child of type ViewBase. Iteration stops if this method returns falsy value.

        • (child: ViewBase): boolean
        • Parameters

          • child: ViewBase

          Returns boolean

    Returns void

eachChildView

  • eachChildView(callback: function): void
  • Iterates over children of type View.

    Parameters

    • callback: function

      Called for each child of type View. Iteration stops if this method returns falsy value.

        • (view: View): boolean
        • Parameters

          • view: View

          Returns boolean

    Returns void

ensureDomNode

  • ensureDomNode(): any
  • unstable

    Ensures a dom-node for this view.

    Returns any

focus

  • focus(): boolean
  • Tries to focus the view. Returns a value indicating whether this view or one of its descendants actually took focus.

    Returns boolean

get

  • get(name: string): any
  • Gets the value of the specified property.

    Parameters

    • name: string

    Returns any

getActualSize

  • getActualSize(): Size
  • Returns the actual size of the view in device-independent pixels.

    Returns Size

getGestureObservers

  • getGestureObservers(type: GestureTypes): Array<GesturesObserver>
  • Parameters

    • type: GestureTypes

    Returns Array<GesturesObserver>

getItemAtIndex

  • getItemAtIndex(index: number): any

getLocationInWindow

  • getLocationInWindow(): Point
  • Returns the location of this view in the window coordinate system.

    Returns Point

getLocationOnScreen

  • getLocationOnScreen(): Point
  • Returns the location of this view in the screen coordinate system.

    Returns Point

getLocationRelativeTo

  • getLocationRelativeTo(otherView: View): Point
  • Returns the location of this view in the otherView's coordinate system.

    Parameters

    • otherView: View

    Returns Point

getMeasuredHeight

  • getMeasuredHeight(): number
  • Returns the raw height component.

    Returns number

getMeasuredState

  • getMeasuredState(): number
  • Returns number

getMeasuredWidth

  • getMeasuredWidth(): number
  • Returns the raw width component.

    Returns number

getSafeAreaInsets

  • getSafeAreaInsets(): object
  • Returns the iOS safe area insets of this view.

    Returns object

    • bottom: any
    • left: any
    • right: any
    • top: any

getScrollOffset

  • getScrollOffset(): number

getSelectedItems

  • getSelectedItems(): Array<any>

getViewById

  • getViewById<T>(id: string): T
  • Returns the child view with the specified id.

    Type parameters

    • T: ViewBase

    Parameters

    • id: string

    Returns T

getViewForItem

  • getViewForItem(item: any): View
  • Returns the {N} View that is used to visualize the provided item from the currently assigned source. In case the item is not in the current viewport the method returns undefined.

    Parameters

    • item: any

      The item from the current source for which to find the View.

    Returns View

    The {N} View used to visualize the provided item.

hasListeners

  • hasListeners(eventName: string): boolean
  • Checks whether a listener is registered for the specified event name.

    Parameters

    • eventName: string

      The name of the event to check for.

    Returns boolean

initNativeView

  • initNativeView(): void
  • Initializes properties/listeners of the native view.

    Returns void

isItemSelected

  • isItemSelected(item: any): boolean
  • Checks whether the provided item is selected or not. Returns true if the item is selected, otherwise false.

    Parameters

    • item: any

      an arbitrary item part of the data source the current RadListView instance is populated with.

    Returns boolean

layout

  • layout(left: number, top: number, right: number, bottom: number, setFrame?: boolean): void
  • Assign a size and position to a view and all of its descendants This is the second phase of the layout mechanism. (The first is measuring). In this phase, each parent calls layout on all of its children to position them. This is typically done using the child measurements that were stored in the measure pass(). Derived classes should not override this method. Derived classes with children should override onLayout. In that method, they should call layout on each of their children.

    Parameters

    • left: number
    • top: number
    • right: number
    • bottom: number
    • Optional setFrame: boolean

    Returns void

layoutNativeView

  • layoutNativeView(left: number, top: number, right: number, bottom: number): void
  • Called from onLayout when native view position is about to be changed.

    Parameters

    • left: number

      Left position, relative to parent

    • top: number

      Top position, relative to parent

    • right: number

      Right position, relative to parent

    • bottom: number

      Bottom position, relative to parent

    Returns void

loadView

  • loadView(view: ViewBase): void
  • Load view.

    Parameters

    • view: ViewBase

      to load.

    Returns void

measure

  • measure(widthMeasureSpec: number, heightMeasureSpec: number): void
  • This is called to find out how big a view should be. The parent supplies constraint information in the width and height parameters. The actual measurement work of a view is performed in onMeasure(int, int), called by this method. Therefore, only onMeasure(int, int) can and must be overridden by subclasses.

    Parameters

    • widthMeasureSpec: number

      Horizontal space requirements as imposed by the parent

    • heightMeasureSpec: number

      Vertical space requirements as imposed by the parent

    Returns void

notify

  • notify<T>(data: T): void
  • Notifies all the registered listeners for the event provided in the data.eventName.

    Type parameters

    • T: EventData

    Parameters

    • data: T

      The data associated with the event.

    Returns void

notifyLoadOnDemandFinished

  • notifyLoadOnDemandFinished(disableLoadOnDemand?: boolean): void
  • Must be called when data is delivered after a load-on-demand request has been made. Params: 'disableLoadOnDemand' - indicates if the "loadOnDemandMode" should be reset to 'None' after the event cycle is finished

    Parameters

    • Optional disableLoadOnDemand: boolean

    Returns void

notifyPropertyChange

  • notifyPropertyChange(propertyName: string, value: any, oldValue?: any): void
  • Notifies all the registered listeners for the property change event.

    Parameters

    • propertyName: string
    • value: any
    • Optional oldValue: any

    Returns void

notifyPullToRefreshFinished

  • notifyPullToRefreshFinished(enableLoadOnDemand?: boolean): void
  • Must be called when data is delivered after a pull-to-refresh gesture initiated by the user. Params: 'enableLoadOnDemand' - indicates if the "loadOnDemandMode" should be returned to its previous state, after the event cycle is finished

    Parameters

    • Optional enableLoadOnDemand: boolean

    Returns void

notifySwipeToExecuteFinished

  • notifySwipeToExecuteFinished(): void

observe

  • observe(type: GestureTypes, callback: function, thisArg?: any): any
  • [Deprecated. Please use the on() instead.] Adds a gesture observer.

    Parameters

    • type: GestureTypes

      Type of the gesture.

    • callback: function

      A function that will be executed when gesture is received.

        • (args: GestureEventData): void
        • Parameters

          • args: GestureEventData

          Returns void

    • Optional thisArg: any

      An optional parameter which will be used as this context for callback execution.

    Returns any

off

  • off(eventNames: string | GestureTypes, callback?: function, thisArg?: any): any
  • Removes listener(s) for the specified event name.

    Parameters

    • eventNames: string | GestureTypes

      Comma delimited names of the events or gesture types the specified listener is associated with.

    • Optional callback: function

      An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.

        • (args: EventData): void
        • Parameters

          • args: EventData

          Returns void

    • Optional thisArg: any

      An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

    Returns any

on

  • on(eventNames: string | GestureTypes, callback: function, thisArg?: any): any
  • on(event: "loaded", callback: function, thisArg?: any): any
  • on(event: "unloaded", callback: function, thisArg?: any): any
  • on(event: "androidBackPressed", callback: function, thisArg?: any): any
  • on(event: "showingModally", callback: function, thisArg?: any): void
  • on(event: "shownModally", callback: function, thisArg?: any): any
  • A basic method signature to hook an event listener (shortcut alias to the addEventListener method).

    Parameters

    • eventNames: string | GestureTypes

      String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by , (e.g. "propertyChange", "change") or you can use gesture types.

    • callback: function

      Callback function which will be executed when event is raised.

        • (args: EventData): void
        • Parameters

          • args: EventData

          Returns void

    • Optional thisArg: any

      An optional parameter which will be used as this context for callback execution.

    Returns any

  • Raised when a loaded event occurs.

    Parameters

    • event: "loaded"
    • callback: function
        • (args: EventData): void
        • Parameters

          • args: EventData

          Returns void

    • Optional thisArg: any

    Returns any

  • Raised when an unloaded event occurs.

    Parameters

    • event: "unloaded"
    • callback: function
        • (args: EventData): void
        • Parameters

          • args: EventData

          Returns void

    • Optional thisArg: any

    Returns any

  • Raised when a back button is pressed. This event is raised only for android.

    Parameters

    • event: "androidBackPressed"
    • callback: function
        • (args: EventData): void
        • Parameters

          • args: EventData

          Returns void

    • Optional thisArg: any

    Returns any

  • Raised before the view is shown as a modal dialog.

    Parameters

    • event: "showingModally"
    • callback: function
        • (args: ShownModallyData): void
        • Parameters

          • args: ShownModallyData

          Returns void

    • Optional thisArg: any

    Returns void

  • Raised after the view is shown as a modal dialog.

    Parameters

    • event: "shownModally"
    • callback: function
        • (args: ShownModallyData): void
        • Parameters

          • args: ShownModallyData

          Returns void

    • Optional thisArg: any

    Returns any

onBackPressed

  • onBackPressed(): boolean
  • Derived classes can override this method to handle Android back button press.

    Returns boolean

onLayout

  • onLayout(left: number, top: number, right: number, bottom: number): void
  • Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.

    Parameters

    • left: number

      Left position, relative to parent

    • top: number

      Top position, relative to parent

    • right: number

      Right position, relative to parent

    • bottom: number

      Bottom position, relative to parent

    Returns void

onLoaded

  • onLoaded(): void
  • Returns void

onMeasure

  • onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void
  • Measure the view and its content to determine the measured width and the measured height. This method is invoked by measure(int, int) and should be overriden by subclasses to provide accurate and efficient measurement of their contents. When overriding this method, you must call setMeasuredDimension(int, int) to store the measured width and height of this view. Failure to do so will trigger an exception, thrown by measure(int, int).

    Parameters

    • widthMeasureSpec: number

      horizontal space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.

    • heightMeasureSpec: number

      vertical space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.

    Returns void

onResumeNativeUpdates

  • onResumeNativeUpdates(): void
  • Returns void

onUnloaded

  • onUnloaded(): void
  • Returns void

once

  • once(event: string, callback: function, thisArg?: any): any
  • Adds one-time listener function for the event named event.

    Parameters

    • event: string

      Name of the event to attach to.

    • callback: function

      A function to be called when the specified event is raised.

        • (data: EventData): void
        • Parameters

          • data: EventData

          Returns void

    • Optional thisArg: any

      An optional parameter which when set will be used as "this" in callback method call.

    Returns any

refresh

  • refresh(): void

removeEventListener

  • removeEventListener(eventNames: string, callback?: any, thisArg?: any): any
  • Removes listener(s) for the specified event name.

    Parameters

    • eventNames: string

      Comma delimited names of the events the specified listener is associated with.

    • Optional callback: any

      An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.

    • Optional thisArg: any

      An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

    Returns any

requestLayout

  • requestLayout(): void
  • Invalidates the layout of the view and triggers a new layout pass.

    Returns void

resetNativeView

  • resetNativeView(): void
  • Resets properties/listeners set to the native view.

    Returns void

resumeUpdates

  • resumeUpdates(refresh: boolean): any

scrollToIndex

  • scrollToIndex(index: number, animate: boolean): void
  • scrollToIndex(index: number, animate: boolean, snapMode: ListViewItemSnapMode): void
  • scrollToIndex(index: number): void
  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    • animate: boolean

      a boolean value determining whether the list will animate to the desired position.

    Returns void

  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    • animate: boolean

      a boolean value determining whether the list will animate to the desired position. Currently, the animate value must always be {@code true}.

    • snapMode: ListViewItemSnapMode

      a value from the ListViewItemSnapMode enum determining the snap position for the item at the target index.

    Returns void

  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    Returns void

scrollWithAmount

  • scrollWithAmount(amount: number, animate: boolean): void
  • Scrolls the list component with a given amount of pixels in the currently active direction. The scroll is either in a forward or a backward direction depending on the sign of the amount.

    Parameters

    • amount: number

      the amount of pixels to scroll by.

    • animate: boolean

      if animation is to be used when scrolling, otherwise {@code false}.

    Returns void

selectAll

  • selectAll(): void

selectItemAt

  • selectItemAt(index: number): any

set

  • set(name: string, value: any): void
  • Updates the specified property with the provided value.

    Parameters

    • name: string
    • value: any

    Returns void

setInlineStyle

  • setInlineStyle(style: string): void
  • Parameters

    • style: string

    Returns void

setMeasuredDimension

  • setMeasuredDimension(measuredWidth: number, measuredHeight: number): void
  • This method must be called by onMeasure(int, int) to store the measured width and measured height. Failing to do so will trigger an exception at measurement time.

    Parameters

    • measuredWidth: number

      The measured width of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.

    • measuredHeight: number

      The measured height of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.

    Returns void

setNativeView

  • setNativeView(view: any): void
  • Set the nativeView field performing extra checks and updates to the native properties on the new view. Use in cases where the createNativeView is not suitable. As an example use in item controls where the native parent view will create the native views for child items.

    Parameters

    • view: any

    Returns void

showModal

  • showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase
  • showModal(view: ViewBase, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase
  • showModal(moduleName: string, modalOptions: ShowModalOptions): ViewBase
  • showModal(view: ViewBase, modalOptions: ShowModalOptions): ViewBase
  • showModal(): ViewBase
  • deprecated

    Use showModal with ShowModalOptions instead. Shows the View contained in moduleName as a modal view.

    Parameters

    • moduleName: string

      The name of the module to load starting from the application root.

    • context: any

      Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.

    • closeCallback: Function

      A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.

    • Optional fullscreen: boolean

      An optional parameter specifying whether to show the modal view in full-screen mode.

    • Optional animated: boolean

      An optional parameter specifying whether to show the modal view with animation.

    • Optional stretched: boolean

      An optional parameter specifying whether to stretch the modal view when not in full-screen mode.

    Returns ViewBase

  • deprecated

    Use showModal with ShowModalOptions instead. Shows the view passed as parameter as a modal view.

    Parameters

    • view: ViewBase

      View instance to be shown modally.

    • context: any

      Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.

    • closeCallback: Function

      A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.

    • Optional fullscreen: boolean

      An optional parameter specifying whether to show the modal view in full-screen mode.

    • Optional animated: boolean

      An optional parameter specifying whether to show the modal view with animation.

    • Optional stretched: boolean

      An optional parameter specifying whether to stretch the modal view when not in full-screen mode.

    Returns ViewBase

  • Shows the View contained in moduleName as a modal view.

    Parameters

    • moduleName: string

      The name of the module to load starting from the application root.

    • modalOptions: ShowModalOptions

      A ShowModalOptions instance

    Returns ViewBase

  • Shows the view passed as parameter as a modal view.

    Parameters

    • view: ViewBase

      View instance to be shown modally.

    • modalOptions: ShowModalOptions

      A ShowModalOptions instance

    Returns ViewBase

  • Deprecated. Showing view as modal is deprecated. Use showModal method with arguments.

    Returns ViewBase

suspendUpdates

  • suspendUpdates(): void

unbind

  • unbind(property: string): void
  • Parameters

    • property: string

    Returns void

unloadView

  • unloadView(view: ViewBase): void
  • Unload view.

    Parameters

    • view: ViewBase

      to unload.

    Returns void

updateHeaderFooter

  • updateHeaderFooter(): void
  • Refreshes the view/template set to the header and footer elements of RadListView by rebinding it to the source, triggering new measuring and layout circle. Note: This method is only supported in iOS, calling it on Android does nothing.

    Returns void

updatesSuspended

  • updatesSuspended(): boolean

Static combineMeasuredStates

  • combineMeasuredStates(curState: number, newState: any): number
  • Parameters

    • curState: number
    • newState: any

    Returns number

Static layoutChild

  • layoutChild(parent: View, child: View, left: number, top: number, right: number, bottom: number): void
  • Layout a child by taking into account its margins, horizontal and vertical alignments and a given bounds.

    Parameters

    • parent: View

      This parameter is not used. You can pass null.

    • child: View
    • left: number

      Left position, relative to parent

    • top: number

      Top position, relative to parent

    • right: number

      Right position, relative to parent

    • bottom: number

      Bottom position, relative to parent

    Returns void

Static measureChild

  • measureChild(parent: View, child: View, widthMeasureSpec: number, heightMeasureSpec: number): object
  • Measure a child by taking into account its margins and a given measureSpecs.

    Parameters

    • parent: View

      This parameter is not used. You can pass null.

    • child: View

      The view to be measured.

    • widthMeasureSpec: number
    • heightMeasureSpec: number

    Returns object

    • measuredHeight: number

      The measured height that the parent layout specifies for this view.

    • measuredWidth: number

      The measured width that the parent layout specifies for this view.

Static resolveSizeAndState

  • resolveSizeAndState(size: number, specSize: number, specMode: number, childMeasuredState: number): number
  • Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpec. Will take the desired size, unless a different size is imposed by the constraints. The returned value is a compound integer, with the resolved size in the {@link #MEASURED_SIZE_MASK} bits and optionally the bit {@link #MEASURED_STATE_TOO_SMALL} set if the resulting size is smaller than the size the view wants to be.

    Parameters

    • size: number
    • specSize: number
    • specMode: number
    • childMeasuredState: number

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method