Android customized listview layout to realize pull-up loading pull-down refresh function
Listview implements pull-up loading and pull-down refresh in many ways. The following is a custom layout I wrote, which is also highly reusable. The first is the inherited listview custom view.
AutoListView.Java:
The above code is the key to the implementation. The following is the head layout and foot layout:
foot_ view.xml:
pull_ to_ refresh_ header.xml:
activity_ main.xml:
The above steps are to load different layouts up and down the listview. The above code is also the code to be reused. The following code is how to use it
MainActivity.java:
The following is the implementation, which is to set monitoring where you need it, and the operations required to load and refresh it!
The above is the Android custom listview layout introduced by Xiaobian. It realizes the pull-up load pull-down refresh function. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!