开发者

monitoring the listview to slide to the bottom

i get the data from the Internet and show in the listview,i want to make it come true that when i slide the screen with my finger and if th开发者_运维百科e listview is to slide to the bottom ,i will get more data from the Internet and update the adapter of the listview.But how can i monitor the listview to slide to the bottom,there seems no functions in the SDK api.


Check out the 'AbsListView.OnScrollListener' interface, that's what you're looking for. Implement it, then register the implementing class with your ListView. With the paramteres you get when you scroll, you can detect if the user reached the bottom of the ListView. Then, you simply download more content from the Net, and update the adapter. Remember to call 'notifiyDatasetChanged()' after adding stuff to the adapter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜