An example of this paper describes the implementation of Android sliding dynamic paging. Share to everyone for your reference, specific as follows:
Implement Android.widget.AbsListView.OnScrollListener
Main code:
private int lastitemindex;
@Override public
void Onscroll (Abslistview v, int firstvisibleitem,int visibleitemcount, int totalitemcount) {
Lastitemindex = Firstvisibleitem + visibleItemCount-1;
}
@Override public
void Onscrollstatechanged (Abslistview v., int state) {
//Adapter.count is The Count property in Android.widget.BaseAdapter
if (lastitemindex = = Adapter.count && state = = Onscrolllistener.scroll_state_idle) {
Adapter.count + = ten;
Adapter.notifydatasetchanged ();
}
For more information on Android-related content readers can view the site: "Android graphics and image processing skills summary", "Android Development introduction and Advanced Course", "Android debugging techniques and common problems solution summary", " Android Multimedia How-to Summary (audio, video, audio, etc), summary of Android Basic components usage, Android View tips Summary, Android layout layout tips and a summary of Android controls usage
I hope this article will help you with the Android program.