ソースを参照

空指针 报错

liujiangyao 7 年 前
コミット
bbd87b1ef2
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java

@@ -110,9 +110,9 @@ public abstract class BaseListFragment<T> extends BaseFragment {
                     //获取最后一个view 位置
                     int lastItemPosition = linearLayoutManager.findLastVisibleItemPosition();
 
-                    View childView = recyclerView.getChildAt(list.size() - 1);
+//                    View childView = recyclerView.getChildAt(list.size() - 1);
                     //底部bottom
-                    int bottom = childView.getBottom();
+//                    int bottom = childView.getBottom();
                     //正常来说RecycleView的顶部坐标应该是0,但是严格来考虑,当RecycleView设置了paddingTop时,所有子view的绘制将以paddingTop的位置为起始位置,所以实际的顶部应该是paddingTop的高度的数值.
                     int topEdge=recyclerView.getPaddingBottom();