我在listview的onScrollStateChanged事件中编写代码。 但是当滚动快速变化时,请强制关闭。
public void onScrollStateChanged(AbsListView arg0, int arg1) {
try {
int getCur = (lstName.getLastVisiblePosition() + 1) % maxName;
if (myCR != null) {
if (getCur == 0) {
Parcelable state = lstName.onSaveInstanceState();
fillList();
lstName.onRestoreInstanceState(state);
}
}
} catch (Exception e) {
}
}
完成Logcat:
http://up.persianscript.ir/uploads/137181658700741.zip