Material-components-android: Is it possible to have the BottomAppBar & FloatingActionButton with menu evenly distributed?

Created on 13 Apr 2018  路  4Comments  路  Source: material-components/material-components-android

Something like the mix concept of BottomNavigationView and BottomAppBar.

like this

Most helpful comment

it is urgly

All 4 comments

it is urgly

I don't think we need this.

Hi I don't think this is part of the spec. So we probably won't implement it. https://material.io/design/components/app-bars-bottom.html#behavior

While this isn't part of spec, I figured that I would add this in case anyone else wants it. With the bottom app back you can evenly space your icons doing this:

if(bottomAppBar.childCount > 0) {
     val actionMenuView = bottomAppBar.getChildAt(0) as ActionMenuView
     actionMenuView.layoutParams.width = android.widget.ActionMenuView.LayoutParams.MATCH_PARENT   
}
Was this page helpful?
0 / 5 - 0 ratings