Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我是本机脚本的新手。在学习本机脚本时,我遇到了一个问题,我有 az 字母并并排列出项目。当我点击 (az) 中的任何项目时,列表视图必须移动到列表项目中匹配的第一个字母。与使用字母的联系人过滤器相同。有什么解决方案。
我想您正在使用 Nativescript-UIRadListView因为您添加到问题中的标签。
RadListView
您可以使用 scrollToIndex:
let listView: RadListView = <RadListView>(frameModule.topmost().currentPage.getViewById("listView")); listView.scrollToIndex(50, false);
其中 50 是您要滚动到的项目的索引,而 false 是您是否要为滚动设置动画。