Doubt about the constants of animations in Android?


Use those constants in an object Go ahead and set the duration (short, medium or long)

int final static config_shortAnimTime=200;
int final static config_mediumAnimTime=400;
int final static config_longAnimTime=500;

Is there any way to get the values set by the user in the device configuration panel?

that is, if the user has set the animations slow or fast, the application takes it into account.

asked by Webserveis 29.05.2016 в 10:51

2 answers


Setting the duration of the animation can be considered relative since, for example, if you create a translation animation you can have it if you set 1000 ms could be considered a short time if the distance is long and vice versa. The time to consider whether it is short or long, depends on the animation you use.

If a constant were set for all the animations, control over them would be lost.

If you refer to the times defined in the developer options, there is no method to obtain them.

answered by 30.05.2016 / 03:32

Another way to get values for animations is to use Android resources android.R .integer.config ...

answered by 30.05.2016 в 09:00