android - 回收视图没有显示所有的东西
问题描述
每个项目我都有一个图像和 3 个数据,你可以看到最后一部分没有显示。底部导航视图阻止了一些信息,我需要将其全部显示出来。
有人帮忙吗?
这是我的布局。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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=".Recycleview">
<ProgressBar
android:id="@+id/progress_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="530dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/bottom"
android:background="?android:attr/windowBackground">
</android.support.design.widget.BottomNavigationView>
</LinearLayout>
</RelativeLayout>
它可以滚动。
解决方案
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ProgressBar
android:id="@+id/progress_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
app:menu="@menu/bottom" />
</LinearLayout>
推荐阅读
- powershell - 通过重叠开始和结束日期对记录进行分组的 PowerShell 脚本
- python - Why I can not transfer "context" from endpoint Django app to HTML page?
- jquery - 关注输入字段时中断刷新事件
- pandas - 在 pandas 中使用基于多个特定条件的 for 循环计算多个列
- r - 精度功能:MAPE校正
- blob - 在 Snowflake DB 的列中加载 GZIP 二进制数据
- angular - 如何在角度 httpClient 订阅回调中禁用加载指示器?
- c# - 将 GridView 子项与 UWP XAML 中的单元格顶部对齐
- linux - 在 centos 上安装 Apache/2.4.37 出现错误
- kubernetes - 如何更改现有持久卷的存储类?