Android realizes the fade in and fade out animation effects in the game

1. Realize the fading animation

It can be implemented in the program in the following ways

Of course, it can also be implemented through the configuration file

First, create an anim folder in the res directory, and then create an XML file gradually. XML in the anim folder xml

The XML file mainly defines the way to implement the gradient

Alpha stands for transparency, 0.0 is completely transparent, 1.0 is completely opaque, and duration refers to excessive time

2. Realize the effect of gradual appearance

The implementation is similar to the above through the configuration file.

The above is all the content that Xiaobian introduced to you about Android's implementation of fade in and fade out animation effects in the game. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time!

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