From 9427fb8aaab4e236892bf7ebcb39bb1f6ebfe246 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Fri, 22 Mar 2024 17:55:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E5=9C=96=E7=89=87=E5=88=AA?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/utils/ActiveImageAdapter.java | 1 + .../java/com/yunbao/main/activity/CommunitySendActivity.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/ActiveImageAdapter.java b/common/src/main/java/com/yunbao/common/utils/ActiveImageAdapter.java index 8873592..22c61e8 100644 --- a/common/src/main/java/com/yunbao/common/utils/ActiveImageAdapter.java +++ b/common/src/main/java/com/yunbao/common/utils/ActiveImageAdapter.java @@ -188,6 +188,7 @@ public class ActiveImageAdapter extends RecyclerView.Adapter { void setData(ActiveImageBean bean, int position) { itemView.setTag(position); + del.setTag(position); if (bean.getImageFile() == null) { mImg.setImageDrawable(null); if (mIconAdd.getVisibility() != View.VISIBLE) { diff --git a/main/src/main/java/com/yunbao/main/activity/CommunitySendActivity.java b/main/src/main/java/com/yunbao/main/activity/CommunitySendActivity.java index 02355c0..1fb62a7 100644 --- a/main/src/main/java/com/yunbao/main/activity/CommunitySendActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CommunitySendActivity.java @@ -198,12 +198,13 @@ public class CommunitySendActivity extends AbsActivity { activeImageAdapter.setActionListener(new ActiveImageAdapter.ActionListener() { @Override public void onAddClick() { - + openImageChooserActivity(); } @Override public void onItemClick(int position) { - + activeImageAdapter.deleteItem(position); + activeImageAdapter.notifyItemRemoved(position); } @Override