android - 在片段和导航栏android中添加边距beetwen扩展浮动操作按钮
问题描述
我在片段中有一个 ExtendedFloatingActionButton,我想在按钮之间添加一些空间,这里的导航栏是我当前的代码
扩展浮动操作按钮
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
.....
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/check_out"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_gravity="end|bottom"
android:layout_marginBottom="?attr/actionBarSize"
app:backgroundTint="@color/white"
android:fontFamily="@font/metropolis_bold"
android:elevation="5dp"
android:gravity="center"
android:text="Check out"
android:textColor="@color/dark_blue" />
</FrameLayout>
然后是主活动布局内的 NavigationBar
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.MainActivity"
android:background="@color/light_grey">
.....
<com.ismaeldivita.chipnavigation.ChipNavigationBar
android:layout_width="match_parent"
android:id="@+id/nav_view"
android:layout_height="?attr/actionBarSize"
app:layout_constraintBottom_toBottomOf="parent"
app:cnb_menuResource="@menu/main_menu"
android:background="@drawable/nav_bar_back"
android:elevation="6dp"/>
.....
</androidx.constraintlayout.widget.ConstraintLayout>
那么如何在那个按钮和导航栏之间添加一些空间
解决方案
推荐阅读
- laravel - 如何销毁和重建 vagrant/homestead 机器?
- entity-framework - 在员工表中插入部门外键时出错
- c++ - 使用带有指向整数变量的指针的 std::sort 会产生意外的输出
- java - 存储库不会 Beanify
- android - 文本大小的按钮在单击 2 次后有效
- sql - SQL查询匹配表1到表2
- css - 使用spring security和thymeleaf时无法加载我的css
- ios - 使用 HealthKit 结果填充 TableView - Swift
- javascript - 需要指导将 excel 修改为 JSON javascript 代码以每组数据输出一个 JSON
- sublimetext3 - 未注册的崇高文本