livModuleChild.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState == SCROLL_STATE_TOUCH_SCROLL)
moduleItemClick = false;
if (scrollState == SCROLL_STATE_IDLE && moduleItemClick)
if (livModuleChild.getFirstVisiblePosition() != mScrollPstion)
livModuleChild.smoothScrollToPositionFromTop(mScrollPstion,
0, 300);
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
}
});
ListView smoothScrollToPositionFromTop 偶现滚动位置不精确问题解决办法
于 2017-05-12 18:21:28 首次发布