i have to make a closed circular list view. the list view moves down infinite times by using
@Override
public int getCount() {
return Integer.MAX_VALUE;
}
but i need to got to the last item of the list when scrolled up so that a it feels as a circular list.
i tried ListView.setSelection(1+(arraylist.size()*100));
but it dosint work as soon as the adapter is set. it only works when set as
circularListAdapter = new CircularListAdapter(adapter);
threeDListView.setAdapter(circularListAdapter);
Handler handler1 = new Handler();
handler1.postDelayed(new Runnable() {
@Override
public void run() {
threeDListView.setSelection(1+(smpl.size()*100));
adapter.notifyDataSetChanged();
}
},1500);
when the delay is less than 1500 it doesn't work. this delay cause the list to jump one sec after the list is displayed. is there any other way to scroll to the last item from the first item?