Android includes
config_longAnimTime
config_mediumAnimTime
config_shortAnimTime
but the actual values identified by these constants don't make sense as milliseconds. I'm sure they get compiled into useful values, and I can determine them with code, but I'm sure someone else knows the answer - and, more to the point, I'm sure other people will be looking for them. So please post the actual values as an answer and save everyone a little bit of time.
Current values (since 3.x):
- config_shortAnimTime=200
- config_mediumAnimTime=400
- config_longAnimTime=500
And the duration of the activity open/close and fragment open/close animations:
- config_activityShortDur=150
- config_activityDefaultDur=220
Here we go:
config_longAnimTime = 400
config_mediumAnimTime = 300
config_shortAnimTime = 150
Directly read the property:
getResources().getInteger(android.R.integer.config_shortAnimTime);
getResources().getInteger(android.R.integer.config_mediumAnimTime);
getResources().getInteger(android.R.integer.config_longAnimTime);
For anyone using java code for create and start animation.
The default duration for a animation is 300
public class ValueAnimator extends Animator implements AnimationHandler.AnimationFrameCallback {
...
// How long the animation should last in ms
private long mDuration = 300;
}