Closed ghost closed 6 years ago
there is ChangeText transition, which in one of the modes can keep the previous text for the time of transition. btw, can you show the code?
Thanks for replay. Here is the code:
TransitionManager.beginDelayedTransition((ViewGroup) binding.getRoot());
binding.buttonDestination.setVisibility(View.GONE);
binding.buttonRequest.setVisibility(View.VISIBLE);
So is there any solution for this?
if you have two buttons why do you change text on the buttons? are you using data binding which can do this for you? what is "S F" from your gif?
but you can try this variant:
TransitionSet transitionSet =
new TransitionSet()
.setOrdering(TransitionSet.ORDERING_SEQUENTIAL)
.addTransition(
new TransitionSet()
.addTransition(new Fade(Fade.OUT))
.addTransition(new ChangeText())
).addTransition(new Fade(Fade.IN))
;
TransitionManager.beginDelayedTransition((ViewGroup) binding.getRoot(), transitionSet);
Well that's what is weird for me too that where this S F thing is coming because i have not set text to that at all in my code. (I'm sure checked this like 10 times :|). And also i didn't changed the text at all i have only made first button hidden and second one visible but it changes the text automatically for a second and i don't know why. Maybe it has something to do with databinding. Using your code it still happens too even if i remove changeText transition.
yeah, data binding should the root of it. could you please debug calls for TextView.setText
Thanks again for response. But i did that and breakpoint doesn't get reached! (breakpoint working properly has been checked using manual test.)
I don't think that is an "F". I believe that us an E. I also get the same issue when starting the transition. The text also becomes out of place after transition
so the text for a view was changed to "select ..." and at the same time the view was hidden via view.setVisibility(gone). why do you change text of view you are going to hide? probably here it was changed automatically by data binding which is wrong. @dev-JE02 you also use databinding?
When doing a simple sequential fade-in & fade out for two buttons for a moment text changes to something weird. i have tried support library too same result.