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);
Don't use a hard-coded value: some devices provide an option to speed up animations: a hard-coded value would ignore that setting.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…