Create a gradient background effect similar to instagram in Android

I used this effect in my recent project. Let's share it with you

https://github.com/zhaoweihaoChina/hnuplus

1. Create some gradient color resources in the drawable folder

color1.xml

color2.xml

color3.xml

color4.xml

2. Create an animation sequence using the gradient created above, named animation_ List.xml and put it in the drawable folder

3. Apply the animation sequence created above to the view at the top level of your layout background

4. Use animationdrawable in your activity to achieve the transition effect

Make the status bar transparent (remove the status bar)

values/styles.xml

values-v19/styles.xml

values-v21/styles.xml

values-v23/styles.xml

summary

The above is what Xiaobian introduced to you about creating a gradient background effect similar to instagram in Android. 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!

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