Closed droidluv closed 6 years ago
Hi. Unfortunately right now I don't have any ideas why it's happening. Maybe you can try to create new project to reproduce it and then share it with me? So with stable steps to reproduce I will be able to debug. Thanks
Ok I'll try with a new project, but I myself am also a little confused why it is not working in that particular part of the code, its as I said the onAnimationEnd is never called ONLY THERE.. sigh
Guys I run into the same issue. The problem is with comparison:
startText.equals(view.getText())
It calls equals on startText which has String type with view.getText()
which returns Charsequence and it fails even if text is the same.
simply calling toString()
solves the issue.
startText.equals(view.getText().toString())
Hi @ggajews. But startText is CharSequence. And it saved to map by calling the same textview.getText() which returns CharSequence
Sorry, you're right. The real issue was view.getText()
was returning SpannableStringBuilder
.
Unfortunately I cannot reproduce it now :(.
My code is as I have given below, the issue is the animation happens properly but the text doesn't change, I found this weird behaviour today, and its weird because similar code in another part of my project works fine, so I did some digging and found out that the
in the library is not getting called for some reason, and the end text is never getting set, also your outAnim and inAnim onAnimationUpdate listeners are working fine, any suggestions on the reason why the onAnimationEnd listener is never called?
//Code in Activity TransitionManager.beginDelayedTransition(constraintLayout, new ChangeText().setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT_IN));//Commenting this line makes the update happen properly title.setText(title);
// My Container