I have List View
that is filled with data from server and when user swipe bot it add another 8 items to list but problem is that scroll go to top every time when user scroll. How can i set scroll to got to last item in list. I tried with
listview.smoothScrollToPosition(merchantadapter.getcount());
but it's not working
Here is my implementation of refresh method
swipyRefreshLayout = (SwipyRefreshLayout) rootView.findViewById(R.id.refreshsales);
swipyRefreshLayout.setOnRefreshListener(new SwipyRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh(SwipyRefreshLayoutDirection direction) {
if (direction == SwipyRefreshLayoutDirection.BOTTOM) {
index++;
swipyRefreshLayout.setRefreshing(false);
showlist();
progressBar.dismiss();
}
}
});
showlist();
return rootView;
}