We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在使用bindingx 做两个列表联动,因为scroll 动画暂时不支持list,我用的是两个scrollview, 然后在一个scrollview 手滑动时,另一个scrollview做bindingx 的 eventType 为scroll的scroll.contentOffsetY动画,在动画中,会出现第二个列表滑动有滞后的情况。
onTouchRight() { let leftList = this.$refs.leftList.ref; let rightList = this.$refs.rightList.ref; this.bindingToken = Binding.bind({ eventType: 'scroll', anchor: rightList, props: [{ element: leftList, property: 'scroll.contentOffsetY', expression: { origin: `y+0` } }] }) }
The text was updated successfully, but these errors were encountered:
@thh0613 hi, 麻烦提供下更多信息。
Sorry, something went wrong.
我查到原因了,在WXViewUpdateService.java这个类,内部类ContentOffsetYUpdater 实现update方法时,切换到主线程然后更新UI,这里是用handle发送message,那么会有一帧(16ms,demo的延迟是20ms)的延迟。如果想要实现两个scroll联动,肯定会持续更新,即肯定会持续发送消息。所以就会另一个scroller会滞后。用原生做了一个例子,
private final RecyclerView.OnScrollListener mLayerOSL = new MyOnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, final int dx, final int dy) { super.onScrolled(recyclerView, dx, dy); // 当楼层列表滑动时,单元(房间)列表也滑动 /* mHandler.post(new Runnable() { @Override public void run() { mRvRoom.scrollBy(dx, dy); } });*/ mRvRoom.scrollBy(dx,dy); } };
如果我打开注释,在handle内部更新,就会造成这两个列表联动的不一致。
Rowandjj
No branches or pull requests
我在使用bindingx 做两个列表联动,因为scroll 动画暂时不支持list,我用的是两个scrollview, 然后在一个scrollview 手滑动时,另一个scrollview做bindingx 的 eventType 为scroll的scroll.contentOffsetY动画,在动画中,会出现第二个列表滑动有滞后的情况。
The text was updated successfully, but these errors were encountered: