Android: fix load anchor not reset in flow layout
This commit is contained in:
		| @@ -45,7 +45,7 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> { | ||||
|     int itemCount = 0; | ||||
|     int batchCount = 15; | ||||
|     SparseArray<String> itemValues = new SparseArray<>(); | ||||
|     private int loadAnchor = 0; | ||||
|     int loadAnchor = -1; | ||||
|  | ||||
|     FlowAdapter(FlowLayoutNode flowLayoutNode) { | ||||
|         this.flowLayoutNode = flowLayoutNode; | ||||
|   | ||||
| @@ -165,6 +165,7 @@ public class FlowLayoutNode extends SuperNode<RecyclerView> 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++) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user