Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[Android] fix data not bind when non-recyclable item is lazy in list (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yxping authored and YorkShen committed Oct 23, 2018
1 parent f56ba86 commit bf595cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -968,10 +968,10 @@ public ListBaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (component.getRealView() != null) {
return new ListBaseViewHolder(component, viewType);
} else {
((WXCell) component).lazy(false);
component.lazy(false);
component.createView();
component.applyLayoutAndEvent(component);
return new ListBaseViewHolder(component, viewType);
return new ListBaseViewHolder(component, viewType, true);
}
} else if (component instanceof WXBaseRefresh) {
return createVHForRefreshComponent(viewType);
Expand Down
Expand Up @@ -47,6 +47,11 @@ public ListBaseViewHolder(WXComponent component, int viewType) {
isRecycled = component.canRecycled();
}

public ListBaseViewHolder(WXComponent component, int viewType, boolean forceBindData) {
this(component, viewType);
isRecycled = isRecycled || forceBindData;
}

public ListBaseViewHolder(View view, int viewType) {
super(view);
mViewType = viewType;
Expand Down

0 comments on commit bf595cf

Please sign in to comment.