【发布时间】:2015-04-21 16:11:33
【问题描述】:
在 Google 的 Material Design 规范中,他们经常显示浮动操作按钮位于工具栏的一半以上,并且覆盖了内容。
http://www.google.com/design/spec/components/buttons-floating-action-button.html
但我尝试了一些变体,工具栏和内容之间仍然存在差距,这是由按钮引起的。
<LinearLayout>
<include layout="@layout/toolbar" />
<include layout="@layout/fab_button" />
<ScrollView>
Content
</ScrollView>
</LinearLayout>
我还尝试将工具栏和 FAB 按钮都放在 FrameLayout 中,它也有差距。 FAB 按钮代码取自 Google 的示例,我没有遇到过将其重叠在 RecyclerView 底部的问题。
有没有办法实现材料设计规范中显示的这种外观。
【问题讨论】:
标签: android-appcompat material-design android-toolbar floating-action-button