android - ScrollView 不显示 Homefragment 中的所有内容
问题描述
我正在尝试禁用滚动视图并显示主页中的所有内容,但是直到没有运气滚动才显示所有内容。我已经尝试了有关此的所有问题,但仍然没有运气。如果有人可以帮助我,我将不胜感激。谢谢你:)
这是fragment_home.xml ..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg">
<ProgressBar
android:id="@+id/progressBar"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
<ScrollView
android:id="@+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:id="@+id/ContainerSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_latest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_featured"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
解决方案
使用来自 airbnb 的库 EPOXY 可以很好地处理您的布局。会让你的生活轻松很多。 https://github.com/airbnb/epoxy
推荐阅读
- java - 在 GreenGrass 组件之间共享 Java 对象的最佳方式?
- php - Fancytree - 用 php 生成树
- java - 如何测试与 tomcat 9 集成的 Hikaricp 连接?
- tensorflow - 在急切模式下将输入传递给损失函数
- amazon-s3 - 我收到 s3 错误:调用 ListBuckets 操作时发生错误 (AccessDenied):访问被拒绝
- python - 在堆积条形图中注释一个变量
- sharepoint - 如何删除共享点日历上的重复事件?
- python - itertools.groupby() 值消失
- javascript - 节点中的异步等待 - 2 同时等待未执行
- javascript - 使用 Javascript 获取 Python 套接字数据