Skip to content

Commit

Permalink
fix bug #22
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadCym committed May 18, 2016
1 parent 93d4d61 commit 7b4c2bc
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@ private BaseViewHolder getLoadingView(ViewGroup parent) {
return new BaseViewHolder(mContext, mLoadingView);
}

@Override
public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
super.onViewAttachedToWindow(holder);
if (holder.getItemViewType() == EMPTY_VIEW) {
if (holder.itemView.getLayoutParams() instanceof StaggeredGridLayoutManager.LayoutParams) {
StaggeredGridLayoutManager.LayoutParams params = (StaggeredGridLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
params.setFullSpan(true);
}
}
}

@Override
public void onBindViewHolder(final RecyclerView.ViewHolder holder, int positions) {

Expand Down

0 comments on commit 7b4c2bc

Please sign in to comment.