I managed to create a simple solution using ListView and scroll it to the nearest position when the scroll is stopped. Just create a ListView and add this OnScrollListener :
EDIT: I updated the code to a better implementation
lv.setOnScrollListener(new OnScrollListener(){ private boolean handleScrollChange = true; public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { } public void onScrollStateChanged(final AbsListView view, int scrollState) { if (!handleScrollChange) return; if(scrollState == OnScrollListener.SCROLL_STATE_IDLE){ View centerView; if (view.getLastVisiblePosition() - view.getFirstVisiblePosition() > 1) {
Rotem source share