Doubt about the constants of animations in Android?

2

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
source

2 answers

1

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
source
0

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

getResources().getInteger(android.R.integer.config_shortAnimTime);
getResources().getInteger(android.R.integer.config_mediumAnimTime);
getResources().getInteger(android.R.integer.config_longAnimTime);
getResources().getInteger(android.R.integer.status_bar_notification_info_maxnum);
    
answered by 30.05.2016 в 09:00