Android listview does not load data when sliding and loads data when stopping
•
Android
This example shares the specific code of loading data when listview slides without loading data and stops for your reference. The specific contents are as follows
Data source configuration (adapter)
The important codes in this adapter are as follows:
Set listening
OK, let's look at the code in the activity, mainly listening to the onscrolllister method of listview
Finally, remember to add sliding monitoring to listview
listview.setOnScrollListener(this);
effect
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码