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.
当我尝试搜索列表视图时,它应该滚动到获得的结果而不是过滤内容。例如,如果我键入“De”,它应该滚动到列表中与 Char 序列“De”匹配的第一个项目,而不是过滤与该序列匹配的项目。
只需找到字符序列(在您的情况下为 DE)可用的位置。
然后通过调用滚动 ListView
listView.setSelection(position);