1

I am using a scroll listener to detect the end of the Listview.The list initially has 20 items. When the end is reached I populate the list with 10 more items from the DB. At the same time I remove the top 10 items which aren't visible. Since I delete the top 10 items the newly added items are shown on screen and the scroll listener detects end of list and populates 10 more items. So my two problems are

1) How do I stop the position of the item I am currently viewing from changing ?

2) How to prevent the onScrollListener from being called multiple times ?

I guess if you could help me with the first problem, the second would automatically be taken care of.

By the way ,I call notifyDatasetchanged to update the content of the adapter. Kindly help, and thanks.

4

0 に答える 0