hosanna-ui-docs - v0.9.0
    Preparing search index...

    ScrollViewView is a composite view for displaying scrollable content.

    • Supports vertical and horizontal scrolling.
    • Allows custom alignment, viewport size, and animated scrolling.
    • Handles focus navigation and restoration.
    ScrollView([
    VGroup(
    episodes.map((item: IProductContentItem, index: number) => {
    return ProductEpisodeCard()
    })
    )
    .id('episodeList')
    .itemSpacing(30)
    ])

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    addChild addChildren addRendererToParentViewRenderer addSubView animateToChild animateToPosition applyIdsToViewStructs applyInitialState applyLayoutStateToNativeRenderer applyStateChanges bottomVerticalPositionHandler buildView canMeasureBounds centerHorizontalPositionHandler centerVerticalPositionHandler clearErrorByErrorField clearErrors configureAudioGuideItem containsChild createDataEvent customHorizontalPositionHandler customVerticalPositionHandler defineHorizontalPosition defineVerticalPosition dismiss dispatch dispatchAction dispatchAsync dispatchSelection findNextFocusable findNextFocusableView findNextFocusableViewByDirection floatingHorizontalPositionHandler floatingVerticalPositionHandler getAudioGuideItem getBounds getBoundsInApp getBoundsInParent getChangedField getChildView getCustomData getField getFlattenedStructs getFlattenedStructsById getFocusedChildToContainerRelativeShifts getNavController getObservableField getSubView getSubViewRenderer handleOnFocusedChildChangeEvent hibernateView inflateViewStructs insertChild insertSubView invalidateLayout invalidateParentLayout isDescendantOf isInFocusChain layoutAt layoutChildren leftHorizontalPositionHandler needToRestorePosition noneHorizontalPositionHandler noneVerticalPositionHandler notifyOnFocusedChildChange onAppear onBlur onDidAddToAggregateView onDidRemoveFromAggregateView onDisappear onFocus onKeyEvent onMount onUnmount onWillAddToAggregateView onWillApplyStateChanges onWillRemoveFromAggregateView performViewManagerLayoutChildren predefinedHorizontalPositionHandler predefinedVerticalPositionHandler present reconcileChildren recycle registerControlWithErrorMessage registerControlWithKnownError release removeChild removeSubView render restorePosition rightHorizontalPositionHandler setError setField setLayoutField setObservableField setShowOnScreen setState showDialog storeDataForRestorePosition topVerticalPositionHandler unobserveObservableObjects wakeView

    Constructors

    Properties

    __isMemoizedStateValid: boolean = false
    _cacheKey: string = ''
    _hid: string
    _isInFocusChain: boolean = false
    _rendereredTranslation: [number, number] = ...
    activeStyleViewStatus: ViewStatus = ViewStatus.Normal
    aggregateView: undefined | IAggregateView.IAggregateView

    IHosannaView


    animationDuration: number = 500

    Duration of scroll animations in ms.

    Animator for smooth scrolling.

    audioGuideHint?: string = ''

    This hint can be used in conjunction with the audio guide item

    audioGuideItem?: string | IAudioGuideItem
    autoScroll: boolean = true

    Enables or disables auto-scrolling to focused child.

    calculatedHeight: number = 0
    calculatedWidth: number = 0
    calculatedX: number = 0
    calculatedY: number = 0
    canReceiveFocus: boolean = true

    Indicates whether the element can receive focus.

    children: BaseView.BaseView<ViewState, ISGNGroup>[] = []

    These are the children that are rendered on screen in the tree structure of the view

    childrenChanged: boolean = false
    clippingRect: number[] = ...
    compositeView: boolean = true

    Indicdates whether the view is a focus group which means it can have a focused child Otherwise it will be focused itself

    contentGroup: undefined | ISGNGroup
    customData?: unknown
    customHorizontalPositionCallback?: (event: FocusChildChangeEvent) => number

    Callback for custom horizontal positioning.

    customPositionX: number = 0

    Custom horizontal position for children.

    customPositionY: number = 0

    Custom vertical position for children.

    customVerticalPositionCallback?: (event: FocusChildChangeEvent) => number

    Callback for custom vertical positioning.

    defaultValues: Partial<ScrollViewState> = {}
    eventHandlers: Record<string, Function> = {}
    focusedChildId?: string
    focusId: string = ''
    height: number = 0
    horizontalAlignment: ScrollHorizontalAlignment = ScrollHorizontalAlignment.Left

    Horizontal alignment of scrollable content.

    id: string = ''
    includeInLayout: boolean = true
    initialFocusId: string = ''
    instancePool: IInstancePool
    isFocused: boolean = false

    Indicates whether the element is currently focused.

    isLayoutDirty: boolean = false
    isPresented: boolean = false

    If true, this view has been presented in an AggregateViewController

    isSkeleton: boolean = false
    isWaking: boolean = false
    lastFocusedChild: undefined | IHosannaView<ViewState> = undefined

    Last focused child view.

    nextViewId: number = 0
    nodePool: INodePool
    onAnimateToPosition?: (translation: [number, number], duration: number) => void

    Optional callback for custom animation to position.

    opacity: number = 1.0
    originalContainerPosition: undefined | [number, number] = undefined

    Original container position for restoration.

    parent?: IHosannaView<ViewState> = undefined
    partialRendererHibernatedState: Partial<ScrollViewState> = {}
    pendingFocusEvent: undefined | FocusChildChangeEvent = undefined

    Pending focus event for deferred scrolling.

    pivotViewToRestorePosition: undefined | IHosannaView<ViewState> = undefined

    View to restore scroll position to.

    rotation: number = 0
    scale: number[] = ...
    scaleRotateCenter: number[] = ...
    scrollablePositionX: undefined | number = undefined
    scrollablePositionY: undefined | number = undefined
    scrollToChild?: IHosannaView<ViewState>

    Child to scroll to.

    staticType: ViewStaticType = ViewStaticType.None
    styleRegistry: IStyleRegistry
    subViews: BaseView.BaseView<ViewState, ISGNGroup>[] = []

    These are the children that were created in getViews, in a flat strcuture - it contains EVERYTHING that we declared.

    subViewsChanged: boolean = false
    translation: number[] = ...
    verticalAlignment: ScrollVerticalAlignment = ScrollVerticalAlignment.Top

    Vertical alignment of scrollable content.

    viewOwner: IHosannaView<ViewState>

    The IHosannaView subclass that created us in getViews

    viewportHeight: number = 0

    Height of the scrollable viewport.

    viewportOriginPosition: [number, number] = ...

    The origin position of the viewport.

    viewportWidth: number = 0

    Width of the scrollable viewport.

    viewStatus: ViewStatus = ViewStatus.Normal
    visible: boolean = true

    Indicates whether the navigatable entity is visible.

    wasScrolled: boolean = false

    Whether the view was scrolled.

    width: number = 0

    Accessors

    Methods

    • Animates the scroll view to bring a child into view.

      Parameters

      • child: IHosannaView<ViewState>

        The child view to scroll to.

      • duration: number

        The animation duration in ms.

      Returns void

    • Animates the scroll view to a specific position.

      Parameters

      • translation: [number, number]

        The [x, y] translation to animate to.

      • duration: number

        The animation duration in ms.

      Returns void

    • Builds the view and attaches it to the view owner.

      Parameters

      • struct: ViewStruct<ViewState>
      • OptionalmountTarget: IHosannaView<ViewState>

        The target to mount the view.

      • childIndex: number = -1

      Returns undefined | IHosannaView<ViewState>

      The built view or undefined.

    • Parameters

      • nextStructs: ViewStruct<ViewState>[]
      • map: Record<string, ViewStruct<ViewState>> = {}
      • idList: { childIndex: number; id: string }[] = []

      Returns {
          idList: { childIndex: number; id: string }[];
          mappedNextStructs: Record<string, ViewStruct<ViewState>>;
      }

    • Presents a new screen in the navigation stack or as a dialog.

      Parameters

      • screen: ViewStruct<ViewState>

        The screen to be presented, represented by a ViewStruct<ViewState>.

      • Optionaloptions: IScreenPresentationOptions

        Optional presentation options.

        • isDialog

          If true, the screen will be presented as a dialog.

        • animated

          If true, the screen transition will be animated.

      Returns void