android - BottomNavigationView 覆盖 Listview 中的最后一项
问题描述
这是我的 ListView 布局:
<?xml version="1.0" encoding="utf-8"?>
<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=".ui.spccheck.CheckSPCFragment">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
tools:ignore="MissingConstraints">
<ListView
android:id="@+id/listviewspc2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@android:color/holo_blue_light"
android:dividerHeight="1.0sp"
>
</ListView>
</RelativeLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_below="@+id/listviewspc2"
android:background="@color/colorPrimaryDark"
app:itemBackground="@color/colorPrimaryDark"
app:itemIconTint="@android:color/white"
app:itemTextColor="@android:color/white"
app:menu="@menu/bottom_nav_menu" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
当列表包含很多项目时,最后一个显示一半,因为底部导航覆盖了它。如何将列表视图设置为底部导航上方?
解决方案
推荐阅读
- rx-java - PublishProcessor.offer() 如何知道下游没有消费之前的发射?
- xml - 优雅的数字按钮未显示在 Android Studio XML 预览中
- python - responseMessages 未在 Django-Swagger 集成中显示
- javascript - 复制已渲染的 Vue.JS 组件
- tensorflow - 在 TensorFlow 和 Pytorch 中联合训练模型
- c++ - Swiftshader ( Angle Project ) vsync 不工作,如何解决?
- java - 如何在spring boot oauth2中允许来自特定主机的特定端点
- google-drive-api - Google Drive API - 存储在 GSuite 共享驱动器中的文件(仅)出现 404 错误
- javascript - 没有发生从 JavaScript 到 python 视图的 AJAX 调用(Django)
- c++ - 与不同变量类型相比的变量的 Clang AST 匹配器