如何在类似于 Google Keep 的 Material 3 Bottom App Bar 中创建停靠/固定的工厂

问题描述 投票:0回答:0

最近,我一直在尝试在 Material 3 的底部应用栏中创建一个停靠/固定的 fab。虽然 material 2 默认支持此功能,但 material 3 已将 fab 完全放置在底部应用栏中。

Material 2 Bottom App Bar with cradled fab Material 3 Bottom App Bar with fab in the corner

起初我以为它根本不在规范中了。然而,Google Keep 的底部应用栏似乎有一个 Material 3 工厂:

Material 3 Bottom App Bar with cradled fab from Google Keep

因此,我想问一下如何使用 xml 在 Material 3 中创建这种样式的底部应用程序栏(带有 cradled fab)。

在 StackOverflow 上寻找类似问题时,我偶然发现了这个问题, 虽然与我的相似,但询问如何在 compose 中专门重新创建效果,但没有答案。奇怪的是,它使用了一个摇篮中的 Material 3 晶圆厂的图像,该图像似乎已从问题中链接的 Material 3 文档中删除。

android android-layout material-design material-components-android android-bottomappbar
© www.soinside.com 2019 - 2024. All rights reserved.