Hierarchy

Methods

  • Starts dragging the provided ListViewItem. By default, ListView starts a drag when a ListViewItem is long pressed. You can disable that behavior by setting longPressDragEnabled.

    Method

    startDrag

    Android

    Since

    4.1.3

    Parameters

    • item: ListViewItem

    Returns void

  • Called when the ListView should save its layout state. This is a good time to save your scroll position, configuration and anything else that may be required to restore the same layout state if the ListView is recreated.

    Method

    saveInstanceState

    Android

    Returns

    Since

    4.0.2

    Returns any

  • Called when the ListView should restore its layout state. This is a good time to restore your scroll position, configuration and anything else that may be required to restore the same layout state if the ListView is recreated.

    Method

    restoreInstanceState

    Android

    Since

    4.0.2

    Parameters

    • state: any

    Returns void

Events

onGesture: ((params: { distanceX: number; distanceY: number }) => boolean)

Type declaration

    • (params: { distanceX: number; distanceY: number }): boolean
    • This event is called when a scroll occurs.

      Returns

      Return true if the event is consumed. onGesture

      Android

      Since

      4.0.0

      Parameters

      • params: { distanceX: number; distanceY: number }
        • distanceX: number
        • distanceY: number

      Returns boolean

onScrollStateChanged: ((newState?: ScrollState, contentOffset?: Point2D) => void)

Type declaration

    • (newState?: ScrollState, contentOffset?: Point2D): void
    • This event is called when a ListView's scroll state is changed. To remove this evet, set null. For better performance, don't set any callback if does not necessary

      Deprecated

      onScrollStateChanged

      Android

      Since

      3.2.1

      Parameters

      Returns void

onAttachedToWindow: (() => void)

Type declaration

    • (): void
    • This event is called when the view is attached to a window. At this point it has a Surface and will start drawing.

      onAttachedToWindow

      Deprecated

      Android

      Since

      4.0.2

      Returns void

onDetachedFromWindow: (() => void)

Type declaration

    • (): void
    • This event is called when the view is detached to a window. At this point it no longer has a surface for drawing.

      onDetachedFromWindow

      Deprecated

      Android

      Since

      4.0.2

      Returns void

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

Type declaration

    • (item: ListViewItem, index: number): void
    • This event is called when user long selects a row at specific index.

      Deprecated

      Android

      Since

      2.0.4

      Parameters

      • item: ListViewItem
      • index: number

        onRowLongSelected

      Returns void

Properties

overScrollMode: OverScrollMode

Gets/sets over-scroll mode for this view.

Property

= UI.Android.OverScrollMode.ALWAYS]

Android

Since

3.0.2

nestedScrollingEnabled: boolean

Gets/sets the nested scrolling enable for this view.

This property should be set to false when this view is inside the bottomsheet for better scrolling experience.

Property

= true]

Android

Since

5.0.4

yogaNode: any
useForeground: boolean

Gets/sets foreground of the view for ripple effect. This property should be set before rippleColor. This property only supported for api level 23 and above.

Property

= false]

Android

Member

UI.View

Since

4.0.2

rippleEnabled: boolean

Gets/sets ripple effect enabled for view. You should set UI.View#rippleColor rippleColor to see the effect.

Property

= false]

Android

Member

UI.View

Since

3.2.1

rippleColor: IColor

Gets/sets ripple effect color for view.

Property

Android

Member

UI.View

Since

3.2.1

elevation: number

Gets/Sets the elevation of the view. For the views that has StateListAnimator natively like Button, will lost its own StateListAnimation when elevation value changed. For details : https://developer.android.com/training/material/shadows-clipping.html

Property

Android

Member

UI.View

See

Since

1.1.12

zIndex: number

Gets/sets the depth location of the view relative to its elevation. To put view over button, you have to change zIndex value after Android Lollipop. On android, default elevation value of button is bigger than other view. This property affects after Android Lollipop. No-op before api level 21.

Property

Android

Member

UI.View

Since

2.0.8

updateRippleEffectIfNeeded: (() => void)

Type declaration

    • (): void
    • Returns void

Generated using TypeDoc