Android customized Taobao pull-down refresh effect

summary

At present, there are many styles of pull-down refresh. Today, we define the pull-down refresh of Taobao. In fact, the pull-down refresh of Taobao is relatively simple, that is, the display and hiding of a ring and a small arrow. Let's see the effect of our implementation first.

Is it a bit like Taobao? Now let's see how to achieve this effect. In order to save trouble, we provide two photos here. The first is the photo of "anytime, anywhere, if you want to Amoy". The second is the photo of the small arrow. Here we draw it ourselves, mainly to realize the drawing and rotation animation of the arc. First of all, I use the famous drop-down refresh here https://github.com/chrisbanes/Android-PullToRefresh You must be familiar with this. Here I modified this library to customize the head and bottom.

Steps:

1. Customize a view. (including the drawing of arcs and the display and hiding of arrows) 2. Customize the head.

1) Create attrs file

2. Create a class taobaoview.class

3. Create a headerlayout drop-down to refresh the header

4. In mainactivity:

Attach GitHub: https://github.com/dalong982242260/TaoBaoRefresh2

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