-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
GridLayoutManager header和Load more的问题 #24
Comments
那你直接使用StaggeredGridLayoutManager就可以了呀 |
StaggeredGridLayoutManager addHeaderView header占的宽度不能通过setSpanSizeLookup设置 |
哦,我知道了你就是想头部也占据一行对吧,我这边改一下就可以了 |
对的,一般使用StaggeredGridLayoutManager 或GridLayoutManager 的时候headerview和footerview的需求大部分都是占一行吧 |
恩 是的,我这边改一下,然后你在试试,稍等5分钟 |
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:v1.7.1' 你试一下 |
试了一下这个问题已经解决,谢谢~ |
没事,有问题再提哦 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当使用GridLayoutManager的时候,addHeaderView占的spansize应该是整个宽度,可以通过一下设置解决问题
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@OverRide
public int getSpanSize(int position) {
if (position == 0) {
return 2;
}
return 1;
}
});
但是loadmore view占地spansize不是整个宽度,看了下代码,loadmore处理了StaggeredGridLayoutManager的情况,但是StaggeredGridLayoutManager的时候addHeaderView的spansize不知道如何处理
The text was updated successfully, but these errors were encountered: