Skip to content

MaterialBottomDrawerLayout

Davide Giuseppe Farella edited this page Mar 14, 2019 · 3 revisions

Values

  • bottomAppBar val

    Get a nullable MaterialBottomAppBar if available in the layout's children

  • fab val

    Get a nullable FloatingActionButton if available in the layout's children

  • topAppBar val

    Get a nullable AppBarLayout if available in the layout's children

  • panels val

    A MutableMap composed by the Panel ID ( Int ) and the MaterialPanel

    This value is public since needed from navigation extension, but should NOT be modified directly.

  • drawer var

    The MaterialDrawer

Functions

Layout

  • hideToolbar

    Hide the topAppBar, if any.

    See BottomAppBar.Behavior.slideDown for duration and interpolator.

    params

    • doOnAnimationEnd

      A lambda to execute the the animation end.

      Default is empty lambda

  • hideBars

    Hide bottomAppBar and topAppBar, if available.

    See MaterialBottomAppBar.hide

    See MaterialBottomDrawerLayout.hideToolbar

    params

    • withFab

      A Boolean representing whether the FloatingActionButton needs to be hidden

      Default is false

      See MaterialBottomAppBar.fab

    • doOnAnimationEnd

      A lambda that will be executed when the animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

  • showToolbar

    Show the topAppBar, if any.

    See BottomAppBar.Behavior.slideUp for duration and interpolator.

    params

    • doOnAnimationEnd A lambda to execute the the animation end.

      Default is empty lambda

  • showBars

    Show bottomAppBar and topAppBar, if available.

    See MaterialBottomAppBar.show

    See MaterialBottomDrawerLayout.showToolbar

    params

    • doOnAnimationEnd

      A lambda that will be executed when the animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

  • hideAndShowToolbar

    Hide and the show the topAppBar, if any.

    See MaterialBottomDrawerLayout.hideToolbar See MaterialBottomDrawerLayout.showToolbar

    params

    • delay

      The delay in millisec from the end of hideToolbar and the start of showToolbar

    • doAfterHide A lambda to execute the hideToolbar the animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

    • doAfterShow A lambda to execute the showToolbar the animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

  • hideAndShowBars

    Hide and Show topAppBar and bottomAppBar ( and the relative FloatingActionButton, if withFab is true ), if available.

    See MaterialBottomAppBar.hideAndShow

    See MaterialBottomDrawerLayout.hideAndShowToolbar

    params

    • withFab

      A Boolean representing whether the FloatingActionButton needs to be hidden

      Default is false

      See MaterialBottomAppBar.fab

    • delay

      A Long delay is milliseconds before start to show the topAppBar and bottomAppBar, after they have been hidden

      Default is 150 ms

    • doAfterHide

      A lambda that will be executed when the hide animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

    • doAfterShow

      A lambda that will be executed when the show animation ends

      Default is an empty lambda

      See ViewPropertyAnimator.withEndAction

Panels

  • setPanel

    Set a new MaterialPanel to MaterialBottomDrawerLayout.panels, other panels with the same id will be removed.

    MaterialPanel is typealias of AbsMaterialPanel

    For set a MaterialDrawer use MaterialBottomDrawerLayout.drawer]

    params

    • materialPanel

      The MaterialPanel to add`

    • id

      the ID to assign to the materialPanel

  • removePanel

    Remove a MaterialPanel from MaterialBottomDrawerLayout.panels and its relative AbsMaterialPanel.panelView from the layout.

    params

    • id

      the ID of the MaterialPanel to remove

  • openDrawer

    Open a PanelView with ID MaterialBottomDrawerLayout.drawerPanelId

    See openPanel

  • openPanel

    Open a PanelView with the given id

    See MaterialBottomDrawerLayout.grabPanel

    See MaterialBottomDrawerLayout.flyBar

    params

    • id

      the ID of the MaterialPanel to open

  • closeDrawer

    See MaterialBottomDrawerLayout.closePanel

  • closePanel

    Close the current open or grabbed PanelView

Extensions

  • set( id: Int, materialPanel: MaterialPanel )

  • doOnPanelState

    Execute a callback when a MaterialPanel changes its Fly state. It sets MaterialBottomDrawerLayout.panelStateChangeListener

    params

    • callback: PanelStateChangeListener
  • doOnPanelOpen

    Execute a callback when a MaterialPanel changes its Fly state from Fly.BOTTOM. It sets MaterialBottomDrawerLayout.panelOpenStateChangeListener

    params

    • callback: PanelChangeListener
  • doOnPanelClose

    Execute a callback when a MaterialPanel changes its Fly state to Fly.BOTTOM. It sets MaterialBottomDrawerLayout.panelCloseStateChangeListener

    params

    • callback: PanelChangeListener
You can’t perform that action at this time.