The material design documentation has an example of Google Maps showing two floating action buttons next to one another (actually, one above the other).
I can't believe no one has posted the correct answer.
Wrap the buttons in a ViewGroup
and apply the dodgeInsetEdges layout
parameter so that the buttons move up with the bottom sheet. For the above use
case, we can use a LinearLayout
with the XML attribute
app:layout_dodgeInsetEdges="bottom"
.
Note that we can apply this to any view in a CoordinatorLayout
.