android: reset scroller node when reuse this node
This commit is contained in:
@@ -52,7 +52,7 @@ public class ScrollerNode extends SuperNode<HVScrollView> implements IDoricScrol
|
||||
private final Set<DoricScrollChangeListener> listeners = new HashSet<>();
|
||||
private String onScrollFuncId;
|
||||
private String onScrollEndFuncId;
|
||||
private DoricJSDispatcher jsDispatcher = new DoricJSDispatcher();
|
||||
private final DoricJSDispatcher jsDispatcher = new DoricJSDispatcher();
|
||||
|
||||
private static class MaximumScrollView extends HVScrollView {
|
||||
private int maxWidth = Integer.MAX_VALUE;
|
||||
@@ -263,4 +263,11 @@ public class ScrollerNode extends SuperNode<HVScrollView> implements IDoricScrol
|
||||
DoricUtils.dp2px(offset.getProperty("y").asNumber().toFloat()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void reset() {
|
||||
super.reset();
|
||||
onScrollFuncId = null;
|
||||
onScrollEndFuncId = null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user