Tuesday, October 5, 2010

Android Screen Transitions


We can change the default transition in android but it is not necessary that our given transition apply every time. We should create some animation xml files and follow the steps below:
Steps to create activity transitions.
·         Create a folder in the res folder.
·         Named the new created folder as “anim”
·         Put XMLs of animation in it.
·         Call the following method of
o   overridePendingTransition(R.anim.xml_file, R.anim.xml_file);
o   first parameter is the start activity transitions and second is current activity.
o    it should be call immediately after one of the flavors of startActivity(Intent) or finish() to specify an explicit transition animation to perform next.
·         There are number of animations.
o    Alpha
o    Scale
o    Rotate

No comments:

Post a Comment