I have an application in which I used the default slide effects for the standard activity and gradually decreased in a few specific actions.
I noticed that the new Android 4.X (ICS) has different default values that exactly disappear to / from.
How can I determine the effect of my slide in / out at my standard events?
I tried to define it with:
@Override
public void onCreate(Bundle savedInstanceState)
{
this.overridePendingTransition(0, android.R.anim.slide_in_left);
super.onCreate(savedInstanceState);
}
@Override
public void onPause()
{
super.onPause();
overridePendingTransition(android.R.anim.slide_out_right, 0);
}
To reproduce the fading effect, I use:
@Override
public void onCreate(Bundle savedInstanceState)
{
this.overridePendingTransition(0, android.R.anim.fade_in);
super.onCreate(savedInstanceState);
}
@Override
public void onPause()
{
super.onPause();
overridePendingTransition(android.R.anim.fade_in, 0);
}
but could not successfully reproduce it.
Also, I use this code in onCreate and onPause, is this correct? Or is there a better place to express it?
thank
PS: I saw this New Android 4.0 Transitions Between Activities screen , but now an answer has been provided.