andkulikov / Transitions-Everywhere

Set of extra Transitions on top of Jetpack Transitions Library
Apache License 2.0
4.83k stars 486 forks source link

Can I edit transition animation..? #58

Closed BROUDING closed 7 years ago

BROUDING commented 7 years ago

I know I should report some error kinda thing, but you're work is too awesome to make some issues for me.

I really appreciate for your work.

My question is, can I change animation settings like alpha value..? I'm using very basic one "automatic-" and I don't want that alpha setting...

Thanks in advance ::D

andkulikov commented 7 years ago

Hey. You don't need alpha animation at all? Could you show the code which you are using?

BROUDING commented 7 years ago

Thanks for quick reply !

In your Android app "Transitions Everywhere", the first one "Simple animations with AutoTransition" ! (I really like your sample by the way.)

TransitionManager.beginDelayedTransition(transitionsContainer); HIDDEN_VIEW.setVisibility(View.VISIBLE); <<< This is all I wrote! and it works like a charm! (Of course I did some work on LinearLayout and weight settings)

I'm trying to do this, so 'HIDDEN_VIEW' will push up the view above with awesome animation. Since I need to fix the LayoutParam of the view above, I just decided to use this library. And it's too slow to listen until finish moving of the view above.

So I just want to exterminate 'alpha' animation... How can I customize?

BROUDING commented 7 years ago

It seems like the 'alpha animation' is waiting for 'translation animation' right..? So I want to save that alpha animation time...

And also I'd really like to know how to set duration...

Thank you !

andkulikov commented 7 years ago

You can specify transition like this TransitionManager.beginDelayedTransition(transitionsContainer, transition); When you not provide it like in your example its create new AutoTransition() internally

where AutoTransiton is like new TransitionSet() .setOrdering(ORDERING_SEQUENTIAL) .addTransition(new Fade(Fade.OUT)) .addTransition(new ChangeBounds()) .addTransition(new Fade(Fade.IN))

If you want it to perform together just use instead new TransitionSet() .addTransition(new Fade()) .addTransition(new ChangeBounds())

to change duration for fade (alpha animation) new TransitionSet() .addTransition(new Fade().setDuration(150)) .addTransition(new ChangeBounds())

Here you go

BROUDING commented 7 years ago

I appreciate your reply! I bet it will help.

Is there any docs you wrote? Or should I just look into the code?

Have a good day!

andkulikov commented 7 years ago

Please just read my article, thanks https://medium.com/@andkulikov/animate-all-the-things-transitions-in-android-914af5477d50#.ernbwcb9z