Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set transition speed/time in transition everywhere on android

I'm using Transitions-Everywhere for my app, and I wonder if I can set the transition speed/time of the transitions..

I have something like this:

TransitionManager().beginDelayedTransition(animLayout, new ChangeBounds());

FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) findViewById(R.id.myId).getLayoutParams();
layoutParams.height = (int) myHeight;
layoutParams.width = (int) myWidth;
myLayout.setLayoutParams(layoutParams);

In short, I want the transition to be slower than the default, but I just can't figure out how to set the speed of the transition!

like image 449
johnguild Avatar asked Dec 14 '15 22:12

johnguild


People also ask

What is transition duration?

The transition-duration property specifies how many seconds (s) or milliseconds (ms) a transition effect takes to complete.

What is transition speed?

As a blower's speed increases the blower begins to generate high frequency noise in addition to the low frequency noise normally associated with P-D Blowers. The speed at which this occurs is called Transition Speed.


1 Answers

You can set the duration on the Transition you pass into beginDelayedTransition(). In your case that would be ChangeBounds. So try something like this:

final ChangeBounds transition = new ChangeBounds();
transition.setDuration(600L); // Sets a duration of 600 milliseconds
TransitionManager().beginDelayedTransition(animLayout, transition);

By default if no duration is set a Transition falls back to the default animation duration which is 300ms. So for example if you want the transition to take twice as long, use 600ms.

like image 126
Xaver Kapeller Avatar answered Oct 31 '22 11:10

Xaver Kapeller