现在要通过item的信息,使ListView定位到该item的位置,如何实现?
smoothScrollToPosition(int position)
Smoothly scroll to the specified adapter position. // 滑动到适配器指定位置
setSelection(int position)
Sets the currently selected item. // 设置当前选中位置
如果单纯的定位到指定位置,试试第一个方法
listView.setSelection(position);
position
即你想要定位的item的位置。