the*_*osh 7 android android-layout material-design android-jetpack-compose
我正在尝试使用 Jetpack Compose Material 3 制作 Cradled FAB。基于本网站文档中的图像:https ://m3.material.io/components/bottom-app-bar/implementation
然而,在代码中我找不到任何关于在哪里指定锚点位置或将 fab 设置为停靠的信息。示例代码是 XML,我使用的是 Compose。这是怎么做到的?我现在正在使用 Scafold 和 BottomAppBar,但它们似乎没有任何选项来停靠、支撑或锚定浮动操作按钮。
小智 -2
选项之一是使用脚手架,您可以设置“floatingActionButtonPosition”
Scaffold(
bottomBar = { //bottomBar sample },
floatingActionButton = {
//Button
},
floatingActionButtonPosition = FabPosition.Center,
content = {//your content
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2634 次 |
最近记录: |