Android recycleview adds an instance of head configuration encapsulation
•
Android
Android recycleview adds an instance of head configuration encapsulation
This is to encapsulate the recycleview adapter and call it directly. It also adds the function of adding head header. It's great. Write it down today and use it directly next time
Example code:
Then you can directly inherit from your own adapter
And then call it in class.
That's OK.
Layout file:
R.layout.activity_ main
header.xml
item.xml
The above is an example of adding head configuration encapsulation to Android recycleview. If you have any questions, please leave a message or communicate and discuss with the community of this site. Thank you for reading. I hope it can help you. Thank you for your support to this site!
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
二维码