Skip to content

MaterialBottomAppBar

Davide Giuseppe Farella edited this page Mar 13, 2019 · 1 revision

Inherit from com.google.android.material.bottomappbar.BottomAppBar

Custom attributes:

  • app:leftCornerRadius

    size in dp
  • app:rightCornerRadius

    size in dp
  • app:leftCornerStyle

    cut or round
  • app:rightCornerStyle

    cut or round
  • app:hideOnScroll

    boolean ( ref to hideBarOnScroll var )
  • app:hideFabOnScroll

    boolean ( ref to hideFabOnScroll var )

Values:

  • hideBarOnScroll

    A Boolean for keep track whether the MaterialBottomAppBar need to be hidden when a View is scrolled
  • hideFabOnScroll

    A Boolean for keep track whether the MaterialBottomAppBar.fab need to be hidden when a View is scrolled

Functions:

  • hide

    Hide the BottomAppBar and the relative FloatingActionButton if withFab is true

    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 empty lambda

      see MaterialBottomAppBar.Behavior.currentAnimator

      see ViewPropertyAnimator.withEndAction

  • show

    Show the BottomAppBar and the relative FloatingActionButton

    params

    • doOnAnimationEnd

      a lambda that will be executed when the animation ends

      Default is empty lambda

      see MaterialBottomAppBar.Behavior.currentAnimator

      see ViewPropertyAnimator.withEndAction

  • hideAndShow

    Call sequentially MaterialBottomAppBar.hide and MaterialBottomAppBar.show

    params

    • withFab

      a Boolean representing whether the FloatingActionButton needs to be hidden

      Default is false

      see MaterialBottomAppBar.fab

    • delay

      a Long representing the milliseconds to wait after the hide animation, before start the show animation

      Default is 150

    • doAfterHide

      a lambda that will be executed when the hide animation ends

      Default is empty lambda

      see MaterialBottomAppBar.Behavior.currentAnimator

      see ViewPropertyAnimator.withEndAction

    • doAfterShow

      a lambda that will be executed when the show animation ends

      Default is empty lambda

      see MaterialBottomAppBar.Behavior.currentAnimator

      see ViewPropertyAnimator.withEndAction

You can’t perform that action at this time.