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

.asBitmap().crossFade() #1096

Merged
merged 1 commit into from
Mar 28, 2016
Merged

.asBitmap().crossFade() #1096

merged 1 commit into from
Mar 28, 2016

Conversation

TWiStErRob
Copy link
Collaborator

Description

Allow .animate(factory), .asBitmap().crossFade(), .asBitmap().transcode(...).crossFade().
This opens up the API to allow custom transformations via factory (e.g. PaletteBitmap), as well as stock usage of .crossFade() in most cases: now default, asGif and asBitmap all allow cross-fading.
Closes #1007 (v4 already done that) and fixes #840 for v3 (v4 TODO)

Motivation and Context

It has been asked many times (#840, #605, #903, #847, #1007, #63, #155, #261, #362, #405, #749, #1083, UPq4H4009OY) how to do this and I figured out a few workarounds, this incorporates those into a builtin method to ease use while also allowing more customization.


Questions to @sjudd:

  • should I squash?
  • should we set .crossFade() as default for .asBitmap() like it is for drawables?

@TWiStErRob TWiStErRob added this to the 3.8.0 milestone Mar 26, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 83.316% when pulling 49318f0 on TWiStErRob:bitmap_anim into 432f956 on bumptech:3.0.

@sjudd
Copy link
Collaborator

sjudd commented Mar 28, 2016

LGTM thanks!

You can probably squash it, it seems fairly coherent as a single commit. I'd rather avoid the default cross fade to avoid suddenly changing behavior on people. It's also not super performant, we may remove the defaults in v4 altogether.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 83.316% when pulling 20b57a2 on TWiStErRob:bitmap_anim into 432f956 on bumptech:3.0.

@TWiStErRob
Copy link
Collaborator Author

(squashed and passed)

@sjudd
Copy link
Collaborator

sjudd commented Mar 28, 2016

Awesome thanks!

@sjudd sjudd merged commit cb47a64 into bumptech:3.0 Mar 28, 2016
@TWiStErRob TWiStErRob deleted the bitmap_anim branch March 28, 2016 19:14
TWiStErRob added a commit to TWiStErRob/glide that referenced this pull request Jul 10, 2016
… to .asBitmap().transition(withCrossFade())

Also introduce some missing convenience methods and fix some JavaDoc typos.
TWiStErRob added a commit to TWiStErRob/glide that referenced this pull request Jul 10, 2016
… to .asBitmap().transition(withCrossFade())

Fixes bumptech#840
Also introduce some missing convenience methods and fix some JavaDoc typos.
sjudd added a commit that referenced this pull request Jul 11, 2016
Forward port PR #1096: .asBitmap().transition(withCrossFade())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants