Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将下拉刷新 和上拉加载禁掉 会导致EmptyView显示不出来 #70

Closed
ccppcpcpc opened this issue May 5, 2016 · 7 comments
Closed

Comments

@ccppcpcpc
Copy link

mRecyclerView.setLoadingMoreEnabled(false);
mRecyclerView.setPullRefreshEnabled(false);
mRecyclerView.setEmptyView(mEmptyView);
将下拉刷新 和上啦加载禁掉 会导致EmptyView显示不出来 。看了源码 觉得应该不会出现这个问题,但确实是有。

@Damonzh
Copy link
Contributor

Damonzh commented May 10, 2016

你不禁用下拉刷新或者上拉加载的话,emptyView能显示出来?我怎么都显示不出来

@ccppcpcpc
Copy link
Author

可以,首先你的emptyview需要在layout中,然后设置给xRecyclerView。数据集为空的话 setAapter后就可以显示emptyview。 后来发现禁用放在setAdapter之后就可以了。

@Damonzh
Copy link
Contributor

Damonzh commented May 12, 2016

嗷 我把emptyview作为一个独立的布局了 可能是这个原因吧

2016年5月12日星期四,chen2174471 notifications@github.com 写道:

可以,首先你的emptyview需要在layout中,然后设置给xRecyclerView。数据集为空的话
setAapter后就可以显示emptyview。 后来发现禁用放在setAdapter之后就可以了。


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#70 (comment)

@DzwsGo
Copy link

DzwsGo commented Jul 14, 2016

为什么我都下拉和上拉都禁用不了呢?
<com.jcodecraeer.xrecyclerview.XRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/recycler_view"/>

@liuyanji
Copy link

// mRecyclerView.setPullRefreshEnabled(false);//禁止下拉刷新
// mRecyclerView.setLoadingMoreEnabled();//禁止加载更多

@DzwsGo
Copy link

DzwsGo commented Jul 14, 2016

3Q
但是我代码里就是这样写的,放在setAdaper前后都不行。。

@itzuo
Copy link

itzuo commented Aug 8, 2016

请问setEmptyView怎么用啊?为啥我写了一个空页面也不会显示出来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants