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

* [android] Make header can recycled. #1446

Merged
merged 1 commit into from
Aug 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,8 @@ public boolean isLazy() {
return false;
}

@Override
public boolean isSticky() {
return true;
}

@Override
public boolean canRecycled() {
return false;
return !isSticky();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.taobao.weex.ui.ComponentCreator;
import com.taobao.weex.ui.action.BasicComponentData;
import com.taobao.weex.ui.component.WXComponent;
import com.taobao.weex.ui.component.WXHeader;
import com.taobao.weex.ui.component.WXVContainer;
import com.taobao.weex.ui.flat.WidgetContainer;
import com.taobao.weex.ui.view.WXFrameLayout;
Expand Down Expand Up @@ -125,7 +126,7 @@ public boolean isFlatUIEnabled() {
*/
@Override
protected WXFrameLayout initComponentHostView(@NonNull Context context) {
if (isSticky()) {
if (isSticky() || this instanceof WXHeader) {
WXFrameLayout view = new WXFrameLayout(context);
mRealView = new WXFrameLayout(context);
view.addView(mRealView);
Expand Down