Obsolete
Status Update
Comments
tc...@gmail.com <tc...@gmail.com> #2
To use a custom transition in a transition xml do :
<transition
class="com.example.BackgroundRecolor"
android:duration="200"/>
Add constructors from Transition in your custom transition to support xml attributes :
public BackgroundRecolor() {}
public BackgroundRecolor(Context context, AttributeSet attrs) {
super(context, attrs);
}
<transition
class="com.example.BackgroundRecolor"
android:duration="200"/>
Add constructors from Transition in your custom transition to support xml attributes :
public BackgroundRecolor() {}
public BackgroundRecolor(Context context, AttributeSet attrs) {
super(context, attrs);
}
jp...@gmail.com <jp...@gmail.com> #3
Dear original reporter,
I am experiencing the same issue even though I am replacing the drawable:
this.loginBinding!!.loginOptions.background = ColorDrawable(color)
(that's in Kotlin)
But I notice the same problem (I think): the background color changes instantly.
Running API 21
I am experiencing the same issue even though I am replacing the drawable:
this.loginBinding!!.loginOptions.background = ColorDrawable(color)
(that's in Kotlin)
But I notice the same problem (I think): the background color changes instantly.
Running API 21
jp...@gmail.com <jp...@gmail.com> #4
Tried the attached workaround and it works! (...around :) )
As for the commenter who added BackgroundRecolor(Context context, AttributeSet attrs). How could this support 19? That Transition constructor was added in 21. But the Transitions were created in KitKat. So surely it can work. Is it just that in 19 it doesn't use the new constructor?
So the warning is benign?
As for the commenter who added BackgroundRecolor(Context context, AttributeSet attrs). How could this support 19? That Transition constructor was added in 21. But the Transitions were created in KitKat. So surely it can work. Is it just that in 19 it doesn't use the new constructor?
So the warning is benign?
ch...@gmail.com <ch...@gmail.com> #5
Hey guys,
Could someone please re-upload the workaround or post the code? Still can't get it work as of API 27.
Could someone please re-upload the workaround or post the code? Still can't get it work as of API 27.
sa...@google.com <sa...@google.com> #6
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
Description
Changing the background color of the animated view however doesn't change the ColorDrawable (just updates the color).This behavior was changed at some point [1] [2].
This leads to identical ColorDrawables and Colors during createAnimator and no animator is generated.
I attached a workarround for this problem. Could someone tell me how to add such a custom transition to a transitionset in xml?
[1]
[2]