开发者

Slowly fade out my main view Xml and go to another XML

开发者 https://www.devze.com 2023-01-15 04:31 出处:网络
Hai all I want to slowly fade out my main view Xml and go to another XML? Please any开发者_Go百科one give me an example with a sample code.

Hai all I want to slowly fade out my main view Xml and go to another XML?

Please any开发者_Go百科one give me an example with a sample code. please help.


You can define your own animation for window transformations via:

setWindowAnimations(resourceId);

See the documentation in the official android documentation. Now you need to create an Animation that fades the first activity out and then slowly fades the other activity in. Have a look at the animation package especially the AlphaAnimation class.


If you would consider fading in and out images instead of XML views then have a look at this.

0

精彩评论

暂无评论...
验证码 换一张
取 消