Write Android general refresh control yourself

We often have pull-up and pull-down refresh requirements in projects. Almost all listviews and recyclerviews will be accompanied by pull-up and pull-down refresh requirements. If we use some open source controls, we will update them if we change the controls. Now we roll up our sleeves and write a general refresh control

Project address: https://git.oschina.net/qiangshen/commentview.git

Idea:

Purpose: to make all its child controls available, even a textview

Add three controls to him. The head and tail are to refresh the head and tail, and the second is to display the controls normally. The head and tail must implement the headandfootcallback interface to set properties and notify the start and end of refresh

Difficulties: now let's talk about the difficulties encountered in development

This control thinks it is well written. It can help us learn event distribution, animation and interface callback. It also has a certain learning significance

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
分享
二维码
< <上一篇
下一篇>>