Skip to main content

ScrollView

declare class ScrollView extends FrameLayout {}

A view group that allows the view hierarchy placed within it to be scrolled. Scroll view may have only one direct child placed within it. To add multiple views within the scroll view, make the direct child you add a view group, for example LinearLayout, and place additional views within that LinearLayout.

Instance Method

scrollTo

declare class ScrollView {
scrollTo(x:number, y:number):void
}
  • Description

    Set the scrolled position of your view.
    This version also clamps the scrolling to the bounds of our child.

smoothScrollTo

declare class ScrollView {
smoothScrollTo(x:number, y:number):void
}
  • Description

    Like scrollTo(number, number), but scroll smoothly instead of immediately.