Question

public abstract void onScroll (AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount)

totalItemCount the number of items in the list adaptor

I'm new to android.

Is adapter supposed to possess the data(list of items) that listView is going to present? (I've copied/pasted code from here and there and my code has data list in ListFragment class not in adapter)

and totalItemCount is the total count of the items?

Was it helpful?

Solution

See the accepted answer below. I've had problems understanding how ListViews worked. Eventually I answered my own question :) It might help you too.

Android. How does notifyDataSetChanged() method and ListViews work?

OTHER TIPS

Yes you will have to bind the data to the adapter, Adapter will hold your list or whatever form that you have kept your data in, if you need to change the data you will have to send the request to adapter to refresh the view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top