我有一个列表视图,每当更新列表时,我都会强制滚动到列表底部。但是,在滚动到列表底部后,由于某种原因,列表视图会固定在该点,用户无法在列表上来回滚动以查看其他数据。
问题:之后setSelection(list.getBottom())
,我应该有什么才能再次滚动整个列表?
@Override
public View getView(int position, View convertView, ViewGroup parent) {
/* the list is being populated here - the code has been omitted */
list.populateFrom(date, name, class);
list.clearFocus();
list.post(new Runnable() {
@Override
public void run() {
list.setSelection(list.getBottom());
}
});
return list;
}
}