0

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

Please anyone give me an example with a sample code. please help.

James
  • 13,891
  • 26
  • 68
  • 93

2 Answers2

1

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.

Janusz
  • 187,060
  • 113
  • 301
  • 369
0

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

Community
  • 1
  • 1
Crocodile
  • 5,724
  • 11
  • 41
  • 67