Skip to content

Commit

Permalink
修复头部、底部宽度bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yhaolpz committed Oct 16, 2017
1 parent 8ade9ab commit f8fb267
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public void onBindViewHolder(final ItemView holder, int position) {
if (mHeaders.get(position).heightRatio > 0) {
contentParams.height = (int) (ScreenSize.h(contentView.getContext()) *
mHeaders.get(position).heightRatio);
contentParams.width = mHeadFootViewWidth;
contentView.setLayoutParams(contentParams);
}
contentParams.width = mHeadFootViewWidth;
contentView.setLayoutParams(contentParams);
if (mHeaderBind != null) {
mHeaderBind.onBind(holder, position + 1);
}
Expand All @@ -102,9 +102,9 @@ public void onBindViewHolder(final ItemView holder, int position) {
if (mFooters.get(position - getHeaderNum() - mData.size()).heightRatio > 0) {
contentParams.height = (int) (ScreenSize.h(contentView.getContext()) *
mFooters.get(position - getHeaderNum() - mData.size()).heightRatio);
contentParams.width = mHeadFootViewWidth;
contentView.setLayoutParams(contentParams);
}
contentParams.width = mHeadFootViewWidth;
contentView.setLayoutParams(contentParams);
if (mFooterBind != null) {
mFooterBind.onBind(holder, position - getHeaderNum() - mData.size() + 1);
}
Expand Down Expand Up @@ -378,5 +378,4 @@ private static Builder getBuilder() {
}



}

0 comments on commit f8fb267

Please sign in to comment.