Skip to content

Commit

Permalink
Merge pull request #3 from zhuozp/v1.0.1
Browse files Browse the repository at this point in the history
fix: 修复垂直时兼容问题
  • Loading branch information
zhuozp authored Mar 18, 2020
2 parents 657ab80 + 20c9af2 commit 023d2cd
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,17 @@ public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State
}


//如果当前布局过的itemView的宽度总和大于RecyclerView的宽(水平)或宽(垂直),则不再进行布局
if (autalLenght > getWidth()) {
break;
//如果当前布局过的itemView的宽度或高度总和大于RecyclerView的宽(水平)或高(垂直),则不再进行布局
if (this.scrollVertical) {
if (autalLenght > getHeight()) {
break;
}
} else {
if (autalLenght > getWidth()) {
break;
}
}

}
}

Expand Down

0 comments on commit 023d2cd

Please sign in to comment.