Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MDCTabBarAdapter

Defines the shape of the adapter expected by the foundation. Implement this adapter for your framework of choice to delegate updates to the component in your framework of choice. See architecture documentation for more details. https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md

Hierarchy

  • MDCTabBarAdapter

Index

Methods

activateTabAtIndex

  • activateTabAtIndex(index: number, clientRect?: ClientRect): void
  • Activates the tab at the given index with the given client rect

    Parameters

    • index: number

      The index of the tab to activate

    • Optional clientRect: ClientRect

      The client rect of the previously active Tab Indicator

    Returns void

deactivateTabAtIndex

  • deactivateTabAtIndex(index: number): void
  • Deactivates the tab at the given index

    Parameters

    • index: number

      The index of the tab to deactivate

    Returns void

focusTabAtIndex

  • focusTabAtIndex(index: number): void
  • Focuses the tab at the given index

    Parameters

    • index: number

      The index of the tab to focus

    Returns void

getFocusedTabIndex

  • getFocusedTabIndex(): number

getIndexOfTabById

  • getIndexOfTabById(id: string): number
  • Returns the index of the given tab

    Parameters

    • id: string

      The ID of the tab whose index to determine

    Returns number

getOffsetWidth

  • getOffsetWidth(): number

getPreviousActiveTabIndex

  • getPreviousActiveTabIndex(): number

getScrollContentWidth

  • getScrollContentWidth(): number

getScrollPosition

  • getScrollPosition(): number

getTabDimensionsAtIndex

  • getTabDimensionsAtIndex(index: number): MDCTabDimensions
  • Returns the tab dimensions of the tab at the given index

    Parameters

    • index: number

      The index of the tab

    Returns MDCTabDimensions

getTabIndicatorClientRectAtIndex

  • getTabIndicatorClientRectAtIndex(index: number): ClientRect
  • Returns the client rect of the tab's indicator

    Parameters

    • index: number

      The index of the tab

    Returns ClientRect

getTabListLength

  • getTabListLength(): number

incrementScroll

  • incrementScroll(scrollXIncrement: number): void
  • Increments the current scroll position by the given amount

    Parameters

    • scrollXIncrement: number

      The amount to increment scroll

    Returns void

isRTL

  • isRTL(): boolean

notifyTabActivated

  • notifyTabActivated(index: number): void
  • Emits the MDCTabBar:activated event

    Parameters

    • index: number

      The index of the activated tab

    Returns void

scrollTo

  • scrollTo(scrollX: number): void
  • Scrolls to the given position

    Parameters

    • scrollX: number

      The position to scroll to

    Returns void

setActiveTab

  • setActiveTab(index: number): void
  • Sets the tab at the given index to be activated

    Parameters

    • index: number

      The index of the tab to activate

    Returns void

Generated using TypeDoc