Android imitation Jingdong financial home page avatar effect

1. Introduction

Look at the renderings. Some catons recorded by GIF work well on the real machine.

2. Realization

An interesting effect. The principle is actually very simple. It is to monitor the sliding distance of Scrollview on the Y axis, and then dynamically set the position and size of the avatar in the code.

Layout file

The native Scrollview does not support sliding listening. You need to customize an observablescrollview.

3. Write at the end

Welcome to make complaints about the comments. If you think this blog is helpful to you, leave a message or go ahead.

Full demo download

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