diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java index 8fa592ad5..f470d3819 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java @@ -86,9 +86,11 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); loadData = list -> { Log.i("测试", "onData: " + list.size()); - hv.setData(list.get(0), 0); - hv.setData(list.get(1), 1); - hv.setData(list.get(2), 2); + for (int i = 0; i < list.size(); i++) { + if (i < 3) { + hv.setData(list.get(i), i); + } + } }; rootView.addOnOffsetChangedListener(new AppBarLayout.BaseOnOffsetChangedListener() { @Override