diff --git a/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowAdapter.java b/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowAdapter.java index a810f5c1..6e8f77a1 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowAdapter.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowAdapter.java @@ -45,7 +45,7 @@ class FlowAdapter extends RecyclerView.Adapter { int itemCount = 0; int batchCount = 15; SparseArray itemValues = new SparseArray<>(); - private int loadAnchor = 0; + int loadAnchor = -1; FlowAdapter(FlowLayoutNode flowLayoutNode) { this.flowLayoutNode = flowLayoutNode; diff --git a/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowLayoutNode.java b/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowLayoutNode.java index cd62e7a3..6909b63f 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowLayoutNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/flowlayout/FlowLayoutNode.java @@ -165,6 +165,7 @@ public class FlowLayoutNode extends SuperNode implements IDoricScr } String funcId = prop.asString().value(); if (!funcId.equals(this.flowAdapter.renderItemFuncId)) { + this.flowAdapter.loadAnchor = -1; this.flowAdapter.renderItemFuncId = funcId; // If reset renderItem,should reset native cache. for (int index = 0; index < this.flowAdapter.itemValues.size(); index++) {