From 740d3967b3cd19053e161e8b664ef4e2934ef98a Mon Sep 17 00:00:00 2001 From: miomin Date: Tue, 31 Jul 2018 22:10:31 +0800 Subject: [PATCH] * [android] Fix setComponentUsing --- .../ui/view/listview/adapter/RecyclerViewBaseAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/adapter/RecyclerViewBaseAdapter.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/adapter/RecyclerViewBaseAdapter.java index 7c3f92d4c7..b7ba22de2a 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/adapter/RecyclerViewBaseAdapter.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/adapter/RecyclerViewBaseAdapter.java @@ -57,6 +57,13 @@ public void onViewAttachedToWindow(T holder) { } } + @Override + public void onViewDetachedFromWindow(T holder) { + super.onViewDetachedFromWindow(holder); + if (holder != null) + holder.setComponentUsing(false); + } + @Override public void onBindViewHolder(T viewHolder, int i) { if (iRecyclerAdapterListener != null) {