Class Listview<TEvent, TProps>

Since

0.1

Example

import Color from '@smartface/native/ui/color';
import ListView from '@smartface/native/ui/listview';
import ListViewItem from '@smartface/native/ui/listviewitem';
import Label from '@smartface/native/ui/label';
import FlexLayout from '@smartface/native/ui/flexlayout';
import TextAlignment from '@smartface/native/ui/textalignment';

var myDataSet = [
{
title: 'Title 0',
backgroundColor: Color.RED
},
{
title: 'Title 1',
backgroundColor: Color.CYAN
},
{
title: 'Title 2',
backgroundColor: Color.YELLOW
},
{
title: 'Title 3',
backgroundColor: Color.GRAY
}
];
var myListView = new ListView({
flexGrow:1,
rowHeight: 60,
backgroundColor: Color.LIGHTGRAY,
itemCount: myDataSet.length,
});
myListView.onRowCreate = function(){
var myListViewItem = new ListViewItem();
var myLabelTitle = new Label({
height: 40,
width: 100,
alignSelf: FlexLayout.AlignSelf.CENTER,
textAlignment : TextAlignment.MIDCENTER
});
myListViewItem.addChild(myLabelTitle);
myListViewItem.myLabelTitle = myLabelTitle;

return myListViewItem;
};
myListView.onRowBind = function(listViewItem,index){
listViewItem.myLabelTitle.text = myDataSet[index].title;
listViewItem.myLabelTitle.backgroundColor = myDataSet[index].backgroundColor;
};
myListView.onRowSelected = function(listViewItem,index){
console.log("selected index = " + index)
};
myListView.onPullRefresh = function(){
myDataSet.push({
title: 'Title '+ myDataSet.length,
backgroundColor: Color.RED,
})
myListView.itemCount = myDataSet.length;
myListView.refreshData();
myListView.stopRefresh();
};

Type Parameters

Hierarchy

Implements

Properties

Accessors

Methods

Constructors

Properties

_nativeObject: any
onRowSwipe: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => ISwipeItem[])

Type declaration

    • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): ISwipeItem[]
    • Parameters

      • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
        • index: number
        • direction: SwipeDirection
        • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

      Returns ISwipeItem[]

onRowType: ((index?: number) => number)

Type declaration

    • (index?: number): number
    • Parameters

      • Optional index: number

      Returns number

onRowCreate: ((type?: number) => ListViewItem)

Type declaration

    • (type?: number): ListViewItem
    • Parameters

      • Optional type: number

      Returns ListViewItem

onRowHeight: ((index?: number) => number)

Type declaration

    • (index?: number): number
    • Parameters

      • Optional index: number

      Returns number

nativeInner: INativeInner
onRowBind: ((item: ListViewItem, index: number) => void)

Type declaration

    • (item: ListViewItem, index: number): void
    • Parameters

      • item: ListViewItem
      • index: number

      Returns void

onRowSelected: ((item: ListViewItem, index: number) => void)

Type declaration

    • (item: ListViewItem, index: number): void
    • Parameters

      • item: ListViewItem
      • index: number

      Returns void

itemCount: number

Gets/sets the number of rows that will be shown in a ListView. You should update this property after each data operation.

Property

= 0]

Android

Ios

Since

0.1

rowHeight: number

Gets/sets height of a row in a ListView. Once you created the ListView, you can't change row height. If you want to change height of row dynamically, use onRowHeight callback instead.

Property

Android

Ios

Since

0.1

verticalScrollBarEnabled: boolean

Gets/sets the visibility of vertical scroll bar of ListView. If set to true, scroll bar will be shown otherwise scroll bar will be hidden.

Property

= false]

Android

Ios

Since

0.1

scrollEnabled: boolean

If the value of this property is YES , scrolling is enabled, and if it is NO , scrolling is disabled. The default is YES.

Property

= true]

Ios

Android

Since

3.2.0

refreshEnabled: boolean

Enables/disables the refresh function of ListView. If set to false onPullRefresh events will not be called.

Property

= true]

Android

Ios

Since

0.1

rowMoveEnabled: boolean

Enables/disables drag & drop behavior. When rowMoveEnabled property is true, onRowSelected callback is not triggered for iOS.

Property

= false]

Android

Ios

Since

4.1.4

longPressDragEnabled: boolean

When UI.ListView#rowMoveEnabled rowMoveEnabled is true, default value is true but you may want to disable this if you want to start dragging on a custom view touch using UI.ListView#startDrag startDrag.

Property

= false]

Android

Since

4.1.4

swipeEnabled: boolean

Enables the swiping behavior. For iOS, this property changes leftToRightSwipeEnabled and rightToLeftSwipeEnabled properties.

Property

= false]

Ios

Android

Since

4.1.4

contentOffset: { x: number; y: number }

Gets contentOffset of the ListView.

Property

Android

Ios

Returns

Returns

return.x

Returns

return.y

Since

3.1.3

Type declaration

  • Readonly x: number
  • Readonly y: number
onScroll: null | ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

This event is called when a ListView is scrolling. To remove this evet, set null. For better performance, don't set any callback if does not necessary

onScroll

Param

Param

Param

Param

Param

Param

Param

Android

Ios

Since

0.1

onPullRefresh: (() => void)

Type declaration

    • (): void
    • Returns void

contentInset: { top: number; bottom: number }

Gets/Sets contentInset of the ListView.

Property

= {top: 0,bottom: 0}]

Property

Property

Android

Ios

Since

3.0.2

Type declaration

  • top: number
  • bottom: number
onAttachedToWindow: (() => void)

Type declaration

    • (): void
    • Returns void

onDetachedFromWindow: (() => void)

Type declaration

    • (): void
    • Returns void

onRowMoved: ((source: number, destination: number) => void)

Type declaration

    • (source: number, destination: number): void
    • Parameters

      • source: number
      • destination: number

      Returns void

onRowMove: ((source: number, destination: number) => boolean)

Type declaration

    • (source: number, destination: number): boolean
    • Parameters

      • source: number
      • destination: number

      Returns boolean

onRowCanMove: ((index: number) => boolean)

Type declaration

    • (index: number): boolean
    • Parameters

      • index: number

      Returns boolean

onRowCanSwipe: ((index: number) => SwipeDirection[])

Type declaration

    • (index: number): SwipeDirection[]
    • Parameters

      • index: number

      Returns SwipeDirection[]

SwipeItem: ConstructorOf<ISwipeItem, Partial<ISwipeItem>>
iOS: { RowAnimation: typeof RowAnimation }

Type declaration

SwipeDirection: typeof SwipeDirection
borderTopStartRadius: number

Sets/gets top-start corner radius of a view.

Property

= -1]

Android

Ios

Since

5.0.3

borderTopEndRadius: number

Sets/gets top-end corner radius of a view.

Property

= -1]

Android

Ios

Since

5.0.3

borderBottomStartRadius: number

Sets/gets bottom-start corner radius of a view.

Property

= -1]

Android

Ios

Since

5.0.3

borderBottomEndRadius: number

Sets/gets bottom-end corner radius of a view.

Property

= -1]

Android

Ios

Since

5.0.3

shadowColor: IColor

The color of the shadow. UI.View.ios#masksToBounds property must be false for shadow on iOS. On Android, this property only works on Android 9 and above.

Property

= UI.Color.BLACK]

Ios

Android

Since

5.0.3

parent: undefined | IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>>
onTouch: ((e?: Point2D) => boolean)

Type declaration

    • (e?: Point2D): boolean
    • Parameters

      Returns boolean

onTouchEnded: ((isInside: boolean, point: Point2D) => boolean)

Type declaration

    • (isInside: boolean, point: Point2D): boolean
    • Parameters

      Returns boolean

onTouchCancelled: ((point: Point2D) => boolean)

Type declaration

onTouchMoved: ((e: boolean | { isInside: boolean }, point?: Point2D) => boolean)

Type declaration

    • (e: boolean | { isInside: boolean }, point?: Point2D): boolean
    • Parameters

      • e: boolean | { isInside: boolean }
      • Optional point: Point2D

      Returns boolean

getPosition: (() => { left: number; top: number; width: number; height: number })

Type declaration

    • (): { left: number; top: number; width: number; height: number }
    • Returns { left: number; top: number; width: number; height: number }

      • left: number
      • top: number
      • width: number
      • height: number
transitionId: string

Gets/sets the transitionId to be used for transitionViews. See transitionViews for more information

Property

Android

Ios

Since

0.1

accessible: boolean

Gets/sets whether the view is an accessibility element that an assistive app can access.

Property

Android

Ios

Member

UI.View

Since

4.3.2

accessibilityLabel: string

A content description briefly describes the view. VoiceOver will read this string when a user selects the associated element.

Property

Android

Ios

Member

UI.View

Since

4.3.2

alpha: number

Defines the opacity of a view. The value of this property is a float number between 0.0 and 1.0. 0 represents view is completely transparent and 1 represents view is completely opaque.

Property

= 1]

Android

Ios

Member

UI.View

Since

0.1

backgroundColor: ViewState<IColor>

Gets/sets background color of a view. It allows setting background color with UI.Color instance.

Property

= UI.Color.WHITE]

Android

Ios

Member

UI.View

Since

0.1

borderColor: IColor

Sets/gets border color of bounded view.

Property

= UI.Color.BLACK]

Android

Ios

Since

0.1

borderWidth: number

Sets/gets border thickness of bounded view. Accepts unsigned numbers, 0 means no border.

Property

= 0]

Android

Ios

Since

0.1

borderRadius: number

Sets/gets corner radius of a view. BorderRadius maximum value must be half of the shortest edge.

Property

= 0]

Android

Ios

Since

0.1

borderTopLeftRadius: number

Sets/gets top-left corner radius of a view.

Property

= 0]

Android

Ios

Since

5.0.3

borderTopRightRadius: number

Sets/gets top-right corner radius of a view.

Property

= 0]

Android

Ios

Since

5.0.3

borderBottomRightRadius: number

Sets/gets bottom-right corner radius of a view.

Property

= 0]

Android

Ios

Since

5.0.3

borderBottomLeftRadius: number

Sets/gets bottom-left corner radius of a view.

Property

= 0]

Android

Ios

Since

5.0.3

id: number

Gets/sets id of a view. It should be unique number for each object inside page. Id will be generated unique by default.

Property

Android

Ios

Member

UI.View

Since

0.1

testId: string

Gets/sets test id for view. resource-id for android; accessibilityIdentifier for iOS.

Property

Android

Ios

Member

UI.View

Since

4.3.2

visible: boolean

Gets/sets visibility of view. It is set to true as default.

Property

= true]

Android

Ios

Member

UI.View

Since

0.1

rotation: number

Gets/sets the degrees that the view is rotated around the pivot point.

Property

= 0]

Android

Ios

Member

UI.View

Since

1.1.10

rotationX: number

Gets/sets the degrees that the view is rotated around the horizontal axis through the pivot point. RotationX works different for iOS and Android. Android gives perpective to the view but iOS doesn't. This will cause difference on user interface.

Property

= 0]

Android

Ios

Member

UI.View

Since

1.1.10

rotationY: number

Gets/sets the degrees that the view is rotated around the vertical axis through the pivot point. RotationY works different for iOS and Android. Android gives perpective to the view but iOS doesn't. This will cause difference on user interface.

Property

= 0]

Android

Ios

Member

UI.View

Since

1.1.10

touchEnabled: boolean

Enables/disables touches to view. When set to false events related to touches won't fire. It is set to true as default.

Property

= true]

Android

Ios

Member

UI.View

Since

0.1

left: number

Gets/sets left position of a view relative to its parent.

Property

= 0]

Android

Ios

Since

0.1

top: number

Gets/sets top position of a view relative to its parent.

Property

= 0]

Android

Ios

Since

0.1

right: number

Gets/sets right position of a view relative to its parent. This property works only if view's positionType is UI.FlexLayout.PositionType.ABSOLUTE.

Property

= 0]

Android

Ios

Since

0.1

bottom: number

Gets/sets bottom position of a view relative to its parent. This property works only if view's positionType is UI.FlexLayout.PositionType.ABSOLUTE.

Property

= 0]

Android

Ios

Since

0.1

height: number

Gets/sets height of a view.

Property

= 0]

Android

Ios

Since

0.1

width: number

Gets/sets width of a view.

Property

= 0]

Android

Ios

Since

0.1

minWidth: number

Gets/sets minimum width of a view.

Property

= 0]

Android

Ios

Since

0.1

minHeight: number

Gets/sets minimum height of a view.

Property

= 0]

Android

Ios

Since

0.1

maxWidth: number

Gets/sets maximum width of a view.

Property

= 0]

Android

Ios

Since

0.1

maxHeight: number

Gets/sets maximum height of a view.

Property

= 0]

Android

Ios

Since

0.1

paddingTop: number

Gets/Sets the padding space on the top side of a view.

Property

= 0]

Android

Ios

Since

0.1

paddingBottom: number

Gets/Sets the padding space on the bottom side of a view.

Property

= 0]

Android

Ios

Since

0.1

paddingLeft: number

Gets/Sets the padding space on the left side of a view.

Property

= 0]

Android

Ios

Since

0.1

paddingRight: number

Gets/Sets the padding space on the right side of a view.

Property

= 0]

Android

Ios

Since

0.1

padding: number

Gets/Sets the padding space on the all sides of a view.

Property

= 0]

Android

Ios

Since

0.1

marginTop: number

Gets/Sets the margin space on the top side of a view.

Property

= 0]

Android

Ios

Since

0.1

marginBottom: number

Gets/Sets the margin space on the bottom side of a view.

Property

= 0]

Android

Ios

Since

0.1

marginLeft: number

Gets/Sets the margin space on the left side of a view.

Property

= 0]

Android

Ios

Since

0.1

marginRight: number

Gets/Sets the margin space required on the right side of a view.

Property

= 0]

Android

Ios

Since

0.1

margin: number

Gets/Sets the margin space required on the all sides of a view.

Property

= 0]

Android

Ios

Since

0.1

positionType: Flex.PositionType

This property specifies the type of positioning method used for a view. To position a view relative to its parent with top,left,right and bottom properties you must set the position type to absolute.

Property

= UI.FlexLayout.PositionType.RELATIVE]

Android

Ios

Since

0.1

flexGrow: number

This property specifies how much a view will grow relative to the other views inside the same UI.FlexLayout FlexLayout.

Property

= 0]

Android

Ios

Since

0.1

aspectRatio: number

AspectRatio keeps the ratio between the width and the height of a view. AspectRatio has higher priority than UI.View#flexGrow flexGrow.

Property

Android

Ios

Since

0.1

flexShrink: number

This property specifies how much a view will shrink relative to the other views inside the same UI.FlexLayout FlexLayout.

Property

= 1]

Android

Ios

Since

0.1

flexBasis: number

This property specifies the initial length of a view in a UI.FlexLayout FlexLayout.

Property

= -1]

Android

Ios

Since

0.1

scale: Point2D

This property sets the amount that the view is scaled in X & Y around the pivot point, as a proportion of the view's unscaled width. A value of 1 means that no scaling is applied. Actually UI.flipVertically flipVertically & UI.flipHorizontally flipHorizontally functions are assignes -1 to X & Y to mirror the view. So while using scale, need to consider these functions.

Property

Android

Ios

Since

4.0.1

alignSelf: Flex.AlignSelf

This property specifies how a child view aligns in the cross-axis. It overrides the UI.FlexLayout.AlignItems FlexLayout.AlignItems property of the parent.

Property

= UI.FlexLayout.AlignSelf.AUTO]

Android

Ios

Since

0.1

masksToBounds: boolean

A Boolean indicating whether sublayers are clipped to the layer’s bounds. Android sublayers still overlaps the border's width and as known issue,if UI.View#maskedBorders maskedBorders is used then sublayer won't be clipped.

Property

= true]

Ios

Android

Since

4.1.4

maskedBorders: Border[]

Specified enums indicates that which corner of View will have radius.

Property

= [View.Border.TOP_LEFT, View.Border.TOP_RIGHT, View.Border.BOTTOM_RIGHT, View.Border.BOTTOM_LEFT]]

Ios

Android

Since

4.1.4

Deprecated

since 5.0.3 Use the borderBottomRightRadius, borderBottomLeftRadius, borderTopRightRadius, borderTopLeftRadius properties instead.

Border: typeof Border

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

  • get uniqueId(): string
  • Returns string

Methods

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    • props: WithMobileOSProps<TProps, { [key: string]: any }, { [key: string]: any }>["android"]

    Returns void

  • Parameters

    • props: WithMobileOSProps<TProps, { [key: string]: any }, { [key: string]: any }>["ios"]

    Returns void

  • Parameters

    • updates: (() => void)
        • (): void
        • Returns void

    • completion: { e: { finished: boolean } }
      • e: { finished: boolean }
        • finished: boolean

    Returns void

  • This method returns the index of row which is visible at the top of a ListView at a given time.

    Returns

    Method

    getFirstVisibleIndex

    Android

    Ios

    Since

    0.1

    Returns number

  • This method returns the index of row which is visible at the bottom of a ListView at a given time.

    Returns

    Method

    getLastVisibleIndex

    Android

    Ios

    Since

    0.1

    Returns number

  • Sets the colors used in the refresh animation. On Android the first color will also be the color of the bar that grows in response to a user swipe gesture. iOS uses only the first color of the array.

    Method

    setPullRefreshColors

    Android

    Ios

    Since

    0.1

    Parameters

    Returns void

  • This method notify ListView for data changes. After this method is called ListView refreshes itself and recreates the rows. Do not forget to update itemCount property after data changes.

    Method

    refreshData

    Android

    Ios

    Since

    0.1

    Returns void

  • This method notify the ListView that given range of items deleted. Must set the itemCount value to a changed number before calling this function. For iOS, If you want to make multiple changes (insert, delete, refresh) as a single animation, you should use {UI.ListView#performBatchUpdates performBatchUpdates}.

    Method

    deleteRowRange

    Android

    Ios

    Since

    4.1.4

    Parameters

    • params: { positionStart: number; itemCount: number; ios: Partial<{ animation: RowAnimation }> }
      • positionStart: number
      • itemCount: number
      • ios: Partial<{ animation: RowAnimation }>

    Returns void

  • This method notify the ListView that given range of items inserted. Must set the itemCount value to a changed number before calling this function. For iOS, If you want to make multiple changes (insert, delete, refresh) as a single animation, you should use {UI.ListView#performBatchUpdates performBatchUpdates}.

    Method

    insertRowRange

    Android

    Ios

    Since

    4.1.4

    Parameters

    • params: { positionStart: number; itemCount: number; ios: Partial<{ animation: RowAnimation }> }
      • positionStart: number
      • itemCount: number
      • ios: Partial<{ animation: RowAnimation }>

    Returns void

  • This method notify the ListView that given range of items changed. For iOS, If you want to make multiple changes (insert, delete, refresh) as a single animation, you should use {UI.ListView#performBatchUpdates performBatchUpdates}.

    Method

    refreshRowRange

    Android

    Ios

    Since

    4.1.4

    Parameters

    • params: { positionStart: number; itemCount: number; ios?: { animation: RowAnimation } }

    Returns void

  • This method scrolls ListView to a specific index.

    Method

    scrollTo

    Android

    Ios

    Since

    0.1

    Parameters

    • index: number
    • Optional animated: boolean

    Returns void

  • This method start refresh operation and pops up refresh indicator on a ListView. You should be using onPullRefresh on normal circumstances.

    Method

    startRefresh

    Android

    Ios

    Since

    0.1

    Returns void

  • This method cancels refresh operation and stops the refresh indicator on a ListView. You should call this method after finishing event inside onPullRefresh otherwise refresh indicator never stops.

    Method

    stopRefresh

    Android

    Ios

    Since

    0.1

    Returns void

  • This method returns ListViewItem

    Returns

    Method

    listViewItemByIndex

    Android

    Ios

    Since

    0.1

    Parameters

    • index: number

    Returns undefined | ListViewItem

  • This method returns ListViewItem's index.

    Returns

    Returns the index of given UI.ListViewItem listviewitem.

    Method

    indexByListViewItem

    Android

    Ios

    Since

    4.1.4

    Parameters

    • item: ListViewItem

    Returns number

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "attachedToWindow"
    • callback: (() => void)

      Gets as any arguments as it needs

        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "detachedFromWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "pullRefresh"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowCanMove"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowMove"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowMoved"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowSwipe"
    • callback: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => void)
        • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): void
        • Parameters

          • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
            • index: number
            • direction: SwipeDirection
            • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scroll"
    • callback: ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • callback: ((contentOffset: Point2D, decelerate: boolean) => void)
        • (contentOffset: Point2D, decelerate: boolean): void
        • Parameters

          • contentOffset: Point2D
          • decelerate: boolean

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • callback: ((contentOffset: Point2D, velocity: Point2D, targetContentOffset: Point2D) => void)

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Removes the specified event and invokes the callback after it is removed

    Parameters

    • eventName: "attachedToWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "detachedFromWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "pullRefresh"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "rowCanMove"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMove"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMoved"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSwipe"
    • callback: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => void)
        • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): void
        • Parameters

          • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
            • index: number
            • direction: SwipeDirection
            • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

          Returns void

    Returns void

  • Parameters

    • eventName: "scroll"
    • callback: ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

    Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • callback: ((contentOffset: Point2D, decelerate: boolean) => void)
        • (contentOffset: Point2D, decelerate: boolean): void
        • Parameters

          • contentOffset: Point2D
          • decelerate: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • callback: ((contentOffset: Point2D, velocity: Point2D, targetContentOffset: Point2D) => void)

    Returns void

  • Parameters

    Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Triggers the event manually.

    Parameters

    • eventName: "attachedToWindow"

    Returns void

  • Parameters

    • eventName: "detachedFromWindow"

    Returns void

  • Parameters

    • eventName: "pullRefresh"

    Returns void

  • Parameters

    • eventName: "rowCanMove"
    • index: number

    Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • index: number

    Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • item: ListViewItem
    • index: number

    Returns void

  • Parameters

    • eventName: "rowMove"
    • source: number
    • destination: number

    Returns void

  • Parameters

    • eventName: "rowMoved"
    • source: number
    • destination: number

    Returns void

  • Parameters

    • eventName: "rowSelected"
    • item: ListViewItem
    • index: number

    Returns void

  • Parameters

    • eventName: "rowSwipe"
    • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
      • index: number
      • direction: SwipeDirection
      • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

    Returns void

  • Parameters

    Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • contentOffset: Point2D

    Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • contentOffset: Point2D

    Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • contentOffset: Point2D

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • contentOffset: Point2D
    • decelerate: boolean

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • contentOffset: Point2D
    • velocity: Point2D
    • targetContentOffset: Point2D

    Returns void

  • Parameters

    • eventName: "scrollStateChanged"
    • Optional newState: ScrollState
    • Optional contentOffset: Point2D

    Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • Rest ...args: any[]

    Returns void

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "attachedToWindow"
    • callback: (() => void)

      Gets as any arguments as it needs

        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "detachedFromWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "pullRefresh"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowCanMove"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowMove"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowMoved"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "rowSwipe"
    • callback: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => void)
        • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): void
        • Parameters

          • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
            • index: number
            • direction: SwipeDirection
            • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scroll"
    • callback: ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • callback: ((contentOffset: Point2D, decelerate: boolean) => void)
        • (contentOffset: Point2D, decelerate: boolean): void
        • Parameters

          • contentOffset: Point2D
          • decelerate: boolean

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • callback: ((contentOffset: Point2D, velocity: Point2D, targetContentOffset: Point2D) => void)

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Parameters

    • eventName: "attachedToWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "detachedFromWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "pullRefresh"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "rowCanMove"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMove"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMoved"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSwipe"
    • callback: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => void)
        • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): void
        • Parameters

          • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
            • index: number
            • direction: SwipeDirection
            • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

          Returns void

    Returns void

  • Parameters

    • eventName: "scroll"
    • callback: ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

    Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • callback: ((contentOffset: Point2D, decelerate: boolean) => void)
        • (contentOffset: Point2D, decelerate: boolean): void
        • Parameters

          • contentOffset: Point2D
          • decelerate: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • callback: ((contentOffset: Point2D, velocity: Point2D, targetContentOffset: Point2D) => void)

    Returns void

  • Parameters

    Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Adds a one-time listener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    Parameters

    • eventName: "attachedToWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "detachedFromWindow"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "pullRefresh"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "rowCanMove"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowCanSwipe"
    • callback: ((index: number) => void)
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowLongSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMove"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowMoved"
    • callback: ((source: number, destination: number) => void)
        • (source: number, destination: number): void
        • Parameters

          • source: number
          • destination: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSelected"
    • callback: ((item: ListViewItem, index: number) => void)
        • (item: ListViewItem, index: number): void
        • Parameters

          • item: ListViewItem
          • index: number

          Returns void

    Returns void

  • Parameters

    • eventName: "rowSwipe"
    • callback: ((e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }) => void)
        • (e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }): void
        • Parameters

          • e: { index: number; direction: SwipeDirection; ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }> }
            • index: number
            • direction: SwipeDirection
            • ios: Partial<{ expansionSettings: Partial<{ buttonIndex: number; fillOnTrigger: boolean; threshold: number }> }>

          Returns void

    Returns void

  • Parameters

    • eventName: "scroll"
    • callback: ((params?: { translation: Point2D; contentOffset: Point2D }) => void)

    Returns void

  • Parameters

    • eventName: "scrollBeginDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollBeginDragging"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDecelerating"
    • callback: ((contentOffset: Point2D) => void)
        • (contentOffset: Point2D): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWillDecelerate"
    • callback: ((contentOffset: Point2D, decelerate: boolean) => void)
        • (contentOffset: Point2D, decelerate: boolean): void
        • Parameters

          • contentOffset: Point2D
          • decelerate: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "scrollEndDraggingWithVelocityTargetContentOffset"
    • callback: ((contentOffset: Point2D, velocity: Point2D, targetContentOffset: Point2D) => void)

    Returns void

  • Parameters

    Returns void

  • Parameters

    • eventName: "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Call this when something has changed which has invalidated the layout of this view. This will schedule a layout pass of the view tree. It is useful to call this method when you want to change layout parameters on runtime. If this view layout invalidated, call applyLayout from the Page.layout in the iOS and from the view itself in the Android.

    Method

    applyLayout

    Android

    Ios

    Returns void

  • This method put a view to the top of other views in z-direction.

    Method

    bringToFront

    Android

    Ios

    Since

    0.1

    Returns void

  • This method flips the view horizontally.

    Method

    flipHorizontally

    Android

    Ios

    Since

    3.1.3

    Returns void

  • This method flips the view vertically.

    Method

    flipVertically

    Android

    Ios

    Since

    3.1.3

    Returns void

  • This method returns an object that defines view location on screen. Do not use this method for invisible views in UI.ListView ListView and UI.GridView GridView.

    Method

    getScreenLocation

    Returns

    location

    Returns

    location.x

    Returns

    location.y

    Android

    Ios

    Since

    3.2.0

    Returns Point2D

  • Gets the parent view of a view.

    Example

    import FlexLayout from '@smartface/native/ui/flexlayout';
    import Label from '@smartface/native/ui/label';

    var myFlexLayout = new FlexLayout();
    myFlexLayout.id = 5432;

    var myLabel = new Label({
    text: "Smartface Label"
    });
    myFlexLayout.addChild(myLabel);
    var parentId = myLabel.getParent().id; //is equal to 5432.

    Returns

    Parent view of a view, null if not exists.

    Method

    getParent

    Android

    Ios

    Since

    0.1

    Returns null | IViewGroup<"touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "viewAdded" | "viewRemoved", any, MobileOSProps<ViewGroupIOSProps, ViewGroupAndroidProps>>

  • This method marks the view as needs relayout.

    Method

    dirty

    Android

    Ios

    Since

    4.3.6

    Returns void

Constructors

  • Type Parameters

    • TEvent extends string = "touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe"

    • TProps extends IListView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe", MobileOSProps<IListViewIOS, IListViewAndroid>, TProps> = IListView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "scroll" | "scrollBeginDecelerating" | "scrollBeginDragging" | "scrollEndDecelerating" | "scrollEndDraggingWillDecelerate" | "scrollEndDraggingWithVelocityTargetContentOffset" | "attachedToWindow" | "detachedFromWindow" | "pullRefresh" | "scrollStateChanged" | "rowCanMove" | "rowCanSwipe" | "rowLongSelected" | "rowMove" | "rowMoved" | "rowSelected" | "rowSwipe", MobileOSProps<IListViewIOS, IListViewAndroid>>

    Parameters

    • Optional params: Partial<TProps>

    Returns Listview<TEvent, TProps>

Generated using TypeDoc