material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[BottomNavigationView] Button Behaviour with Constraint Layout

Open aggarwalpulkit596 opened this issue 7 years ago • 4 comments

There should be the support of buttons/fab/extended fab with bottom navigation and constraint layout with fab behavior so that fab adjust itself on the hiding of bottom navigation currently there is no option to do this and moreover if we try to add a button with bottom navigation and constraint layout the fab goes behind the bottom navigation

aggarwalpulkit596 avatar Sep 23 '19 18:09 aggarwalpulkit596

This is what CoordinatorLayout and corresponding Behaviors are designed for. It's mentioned in the docs: https://material.io/develop/android/components/floating-action-button/

Note: If the FloatingActionButton is a child of a CoordinatorLayout, you get certain behaviors for free. It will automatically shift so that any displayed Snackbars do not cover it, and will automatially hide when covered by an AppBarLayout or BottomSheetBehavior.

killvetrov avatar Sep 25 '19 14:09 killvetrov

I need to achor floating action button to bottoms navigation view but it doesn't work especially if bottom navigation behaviour is set to hide on scroll

aggarwalpulkit596 avatar Sep 25 '19 15:09 aggarwalpulkit596

@aggarwalpulkit596 did you look into BottomAppBar? https://material.io/components/app-bars-bottom

killvetrov avatar Oct 01 '19 14:10 killvetrov

Closing the issue since I think BottomAppBar is the right answer to this.

drchen avatar Jul 16 '21 17:07 drchen