【问题标题】:Mixing bottom app bar and floating action button (FAB)混合底部应用栏和浮动操作按钮 (FAB)
【发布时间】:2019-03-12 04:58:51
【问题描述】:

我想在 Android 中同时使用 BottomNavigationFloatingActionButton,而在 google material components 中没有这样的东西,而且我也没有找到任何第三方库来实现这样的东西。附加的 GIF 演示了我想要实现的内容。事实上,我想要一个底部导航,其中一个标签具有放置在导航栏上的FAB,并且在选择另一个选项卡时,Fab消失。

See the attached image here.

【问题讨论】:

  • 您正在寻找底部应用栏。看这里material.io/design/components/app-bars-bottom.html#你会发现更多..!
  • 不是底部应用栏。底部应用栏的概念与我想要实现的不同。它更像是一个固定在底部的应用栏,其按钮的功能不是导航用户。

标签: android material-design user-experience floating-action-button bottomnavigationview


【解决方案1】:

您不会在示例中找到布局的 Material 组件,因为它与 Material Design Spec 相反。

浮动操作按钮 (FAB) 表示屏幕的主要操作

该示例将提供多个“主要”交互,因为它与导航混合。我不建议在底部导航栏的上下文中使用 FAB。相反,为了用户的利益,通过将 FAB 向上移动到页面右侧,将它们直观地分开。这是Extending the FAB的材料文档

现在您不必遵循 Material Spec但是您不应该期望预构建的 Material 组件会忽略它。

【讨论】:

  • Thank you, I think it does not affect the principles of material design, I just wanted to attach FAB on the bottom bar when one navigation is selected and It will disappear as another navigation is selected.不过,谢谢你的回复,至少现在我确定没有预建组件。
猜你喜欢
  • 2022-10-05
  • 2019-11-08
  • 2023-03-15
  • 2015-08-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多