andkulikov / Transitions-Everywhere

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

ChangeText changes alpha to 1 #70

Closed passsy closed 7 years ago

passsy commented 7 years ago

After the transition the alpha has changed from previously 56% to 100%. The ChangeText Transition should keep track of the text style and set the style values to the previous values.

I'm using this code to animate a text change.

TransitionManager.beginDelayedTransition(container, ChangeText().setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT_IN))
andkulikov commented 7 years ago

Hello. 56% was the alpha of a View? Or it was an alpha part of a color of text? It would be easier if you show the code. Thanks

passsy commented 7 years ago

it was the color of the text not the view.

andkulikov commented 7 years ago

As I can see in the code there can be the case when the text alpha will animate from 0 to 100% and then will be back to 56%. Is it works like this for you?

passsy commented 7 years ago

I've set the text color to 56% alpha, initially. When the text changes and I use the ChangeText() transition the text will be animated from 0% to 100%. I expect only an animation from 0% to 56%.

This means for the user that they initially see a grey text which fits smoothly into the UI and when the text changes it is suddenly dark black.

andkulikov commented 7 years ago

Yeah, if you will check the sources original alpha is ignored https://github.com/andkulikov/Transitions-Everywhere/blob/master/library/src/main/java/com/transitionseverywhere/ChangeText.java#L241 Don't you want to contribute into the project and fix it? It should be really simple. Or I will fix it a bit later when would have time

andkulikov commented 7 years ago

fixed in 1.7.5. Thanks