Android: fix load anchor not reset in flow layout
This commit is contained in:
parent
c3e05a39c0
commit
040823a8af
@ -45,7 +45,7 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> {
|
|||||||
int itemCount = 0;
|
int itemCount = 0;
|
||||||
int batchCount = 15;
|
int batchCount = 15;
|
||||||
SparseArray<String> itemValues = new SparseArray<>();
|
SparseArray<String> itemValues = new SparseArray<>();
|
||||||
private int loadAnchor = 0;
|
int loadAnchor = -1;
|
||||||
|
|
||||||
FlowAdapter(FlowLayoutNode flowLayoutNode) {
|
FlowAdapter(FlowLayoutNode flowLayoutNode) {
|
||||||
this.flowLayoutNode = flowLayoutNode;
|
this.flowLayoutNode = flowLayoutNode;
|
||||||
|
@ -165,6 +165,7 @@ public class FlowLayoutNode extends SuperNode<RecyclerView> implements IDoricScr
|
|||||||
}
|
}
|
||||||
String funcId = prop.asString().value();
|
String funcId = prop.asString().value();
|
||||||
if (!funcId.equals(this.flowAdapter.renderItemFuncId)) {
|
if (!funcId.equals(this.flowAdapter.renderItemFuncId)) {
|
||||||
|
this.flowAdapter.loadAnchor = -1;
|
||||||
this.flowAdapter.renderItemFuncId = funcId;
|
this.flowAdapter.renderItemFuncId = funcId;
|
||||||
// If reset renderItem,should reset native cache.
|
// If reset renderItem,should reset native cache.
|
||||||
for (int index = 0; index < this.flowAdapter.itemValues.size(); index++) {
|
for (int index = 0; index < this.flowAdapter.itemValues.size(); index++) {
|
||||||
|
Reference in New Issue
Block a user