Is it possible to define the transition between two activities for Android 1.5 and better? I would like an activity to fade in.
You can do this with Activity.overridePendingTransition(). You can define simple transition animations in an XML resource file. A good tutorial on this can be found here.
Yes. You can tell the OS what kind of transition you want to have for your activity.
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
getWindow().setWindowAnimations(ANIMATION);
...
}
Where ANIMATION is an integer referring to a built in animation in the OS.
You cannot use overridePendingTransition in Android 1.5. overridePendingTransistion came to Android 2.0.
If you're gonna go through this without any error you have to compile for the target (1.5 or higher) using the ordinary animations (or you own) or you have to compile for the target (2.0 or higher) using overridePendingTransistion.
Summary: You cannot use overridePendingTransistion in Android 1.5.
You can though use the built-in animations in the OS.
What about animations written manually by code? can I use them as setWindowsAnimations?