We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
发现跟网上开源的MultiType库不能一起用
The text was updated successfully, but these errors were encountered:
可以这样试一试,这边测试没有问题。 修改LRecyclerViewAdapter类。找到onViewAttachedToWindow和onViewDetachedFromWindow方法,作出如下修改:
@Override public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
//增加判断1 if (isHeader(holder.getLayoutPosition()) || isRefreshHeader(holder.getLayoutPosition()) || isFooter(holder.getLayoutPosition())) { super.onViewAttachedToWindow(holder); return; } ViewGroup.LayoutParams lp = holder.itemView.getLayoutParams(); if (lp != null && lp instanceof StaggeredGridLayoutManager.LayoutParams) { if (isHeader(holder.getLayoutPosition()) || isRefreshHeader(holder.getLayoutPosition()) || isFooter(holder.getLayoutPosition())) { StaggeredGridLayoutManager.LayoutParams p = (StaggeredGridLayoutManager.LayoutParams) lp; p.setFullSpan(true); } }
mInnerAdapter.onViewAttachedToWindow(holder); } @Override public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder) {
//增加判断2 if (isHeader(holder.getLayoutPosition()) || isRefreshHeader(holder.getLayoutPosition()) || isFooter(holder.getLayoutPosition())) { super.onViewDetachedFromWindow(holder); return; } mInnerAdapter.onViewDetachedFromWindow(holder); }
Sorry, something went wrong.
No branches or pull requests
发现跟网上开源的MultiType库不能一起用
The text was updated successfully, but these errors were encountered: