File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
library/src/main/java/com/cncoderx/recyclerviewhelper/adapter Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ RecyclerViewHelper是基于android 原生库RecyclerView的功能扩展,扩展
1717
1818## 添加依赖
1919``` gradle
20- compile 'com.cncoderx.recyclerviewhelper:library :1.2.2 '
20+ compile 'com.github.CNCoderX:RecyclerViewHelper :1.2.3 '
2121
2222// 如果需要添加抽屉功能,添加依赖:
2323compile "com.daimajia.swipelayout:library:1.2.0@aar"
Original file line number Diff line number Diff line change @@ -148,12 +148,13 @@ private boolean isFullSpan(int position) {
148148
149149 final int adjPosition = position - numHeaderView ;
150150 final int itemCount = mAdapter .getItemCount ();
151+ final int lastPosition = adjPosition - itemCount ;
151152 if (mLoadViewHolder != null && mLoadViewHolder .getState () != ILoadingView .STATE_GONE
152- && adjPosition == itemCount + numFooterView ) {
153+ && lastPosition == numFooterView ) {
153154 return mLoadViewHolder .isFullSpan ;
154155 }
155- if (adjPosition >= itemCount ) {
156- return mFooterViewHolders .get (adjPosition - itemCount ).isFullSpan ;
156+ if (lastPosition >= 0 && lastPosition < numFooterView ) {
157+ return mFooterViewHolders .get (lastPosition ).isFullSpan ;
157158 }
158159 return false ;
159160 }
You can’t perform that action at this time.
0 commit comments