//查看recyclerview的smoothScrollToPosition源码可知道在调用smoothScrollToPosition之前需要先设置LayoutManage
recyclerView.layoutManager = LinearLayoutManager(this)
//需要添加延迟才有滑动效果
LoyoUIThread.runAfterDelay({
recyclerView.smoothScrollToPosition(nodePosition)
}, 500)
RecyclerView滑动到指定位置position
![](https://img-home.csdnimg.cn/images/20240711042549.png)