I have a transition drawable fading from a png to an xml drawable (a simple gradient). When I call startTransition(int time) the image seems to fade strangely, leaving the previous drawable visible in the background, almost as if it only fades half way. It might be worth noting it seems to work without issue on lollipop (i've just seen this happen on kitkat phones I've tested so far).
Is there something I need to do to the xml drawable to make it function properly?
Before calling
startTransition(int time)try to invoke:This seems to be necessary when you want a real cross-fade transition (and not a fade-in one).