The fix was related to ListView's recycling of views, you won't be
able to easily work around the bug without modifying the framework.

On Tue, Feb 2, 2010 at 3:49 AM, Worgle <[email protected]> wrote:
> Hi Romain,
>
> Thanks for taking the time to answer this yourself.
> You're probably right : the fix was probably made on ListView rather
> that on TransitionDrawable.
>
> The reason I need to know where the fix was is that I have to maintain
> backward compatibility with Android 1.5, thus I would be happy to find
> a workaround for this little bug.
>
> I looked at the diffs (since Android 2.1 source code was pushed on
> public git repository today !) but I wasn't able to find the fix yet.
> I'll keep looking for it.
>
> PS : Désolé pour mon anglais, et au passage merci pour ce sympatique
> framework. :)
>
> On Feb 1, 7:37 pm, Romain Guy <[email protected]> wrote:
>> Hi,
>>
>> Why exactly do you need to know what the fix was? I don't remember
>> doing anything to fix TransitionDrawable so it's probably one of the
>> numerous fixes that went into ListView itself that's responsible for
>> the new correct behavior.
>>
>>
>>
>> On Mon, Feb 1, 2010 at 8:39 AM, Worgle <[email protected]> wrote:
>> > Hello,
>>
>> > It seams to me that a bug was fixed between android 2.0.1 and 2.1
>> > about TransitionDrawable (or maybe ImageView).
>>
>> > When using TransitionDrawable in a ListView (with convert view
>> > mechanism) in android 2.0.1 and below, I can't see the Transition if I
>> > scroll rapidly to the end of the list, and then go back to the middle
>> > (even through I'm calling startTransition). Note that my
>> > TransitionDrawable is set as the image of an ImageView.
>> > (Tested on emulators from 1.6 to 2.1, and on real devices : G2 with
>> > 1.5, G2 with 1.6 and Nexuos One with 2.1)
>>
>> > But with android 2.1, the bug magically disappeared ! I'm quite happy
>> > but I still want backward compatibility...
>>
>> > So is there anyone on the android team a bit less busy than the others
>> > who could run a diff on TransitionDrawable and ImageView between 2.01
>> > and 2.1 and tell us what's going on ? :)
>>
>> > Of course the change could have occured on LayerDrawable or other
>> > parent's classes as well...
>>
>> > Thanks,
>>
>> > Fabien
>>
>> > PS : here's part of my code
>>
>> >                    Drawable drawableOld = this.getDrawable();
>> >                    Drawable drawableNew = new BitmapDrawable
>> > (bitmap);
>> >                    Drawable[] layers = {drawableOld, drawableNew};
>> >                    TransitionDrawable transitionDrawable = new
>> > TransitionDrawable(layers);
>> >                    transitionDrawable.setCrossFadeEnabled(true);
>> >                    setImageDrawable(transitionDrawable);
>> >                    transitionDrawable.startTransition
>> > (TRANSITION_DURATION);
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Romain Guy
>> Android framework engineer
>> [email protected]
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to