Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why .crossfade() is not available when we get image asBitmap() #903

Closed
manjunathc23 opened this issue Jan 19, 2016 · 1 comment
Closed
Labels

Comments

@manjunathc23
Copy link

Question : Is there any way we can .crossFade() image when we load image as .asBitmap()?

            Glide.with(getContext())
                    .load(url)
                    .asBitmap()
                    .crossFade() --> Not possible. 
                    .into(imageView);

Or do we need to customize the animate ?

            Glide.with(imageView.getContext())
                    .load(url)
                    .animate("do something here") // TODO
                    .into(imageView);

Just curious why we lose .crossFade() when we load .asBitmap()?

Thanks!
Manju

@TWiStErRob
Copy link
Collaborator

Duplicate of #840 (this time I'm sure ;)
Please subscribe to that issue (right column), as it may get included in a future version. Also see #605 for more discussion.

As to the why, the answer is simple: we call image.setImageBitmap which cannot receive a TransitionDrawable and the Animat-something interface has Bitmap as generic args with asBitmap which hides the potential of the workaround I figured out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants