From 06d241c66c340831018469b0f3042d4eb86af46a Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 17 Nov 2022 17:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/views/AbsMainListChildViewHolder.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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