Piasy / BigImageViewer

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
MIT License
3.98k stars 402 forks source link

Add Glide custom component support #120

Closed SmasSive closed 6 years ago

SmasSive commented 6 years ago

This PR adds a new kind of GlideImageLoader class called GlideCustomImageLoader which allow the consumer of the lib to specify a concrete GlideModule associated with a previously registered glide component. That way, the lib is able to load resources as the client specifies, in the example added we request an specific image size by appending two parameters at the end of url.

Regarding implementation, I've opted to make a new class instead of adding code to the original one (that was my first approach) and messing the code, hope it's the less invasive as possible.

Piasy commented 6 years ago

Thanks for your contribution, I'll check it later.

Piasy commented 6 years ago

And could you please rebase to the latest master branch? Thanks!

SmasSive commented 6 years ago

@Piasy I've done the changes you requested 👍

Piasy commented 6 years ago

@SmasSive Could you please also add description about how to implement custom image request url and more customization, by utilizing classes added by this PR, into the README?

SmasSive commented 6 years ago

@Piasy done! I'm not Shakespeare so... Feel free to modify the README as you want!

Piasy commented 6 years ago

v1.5.2 is published, check it out! Thanks for your contribution!

SmasSive commented 6 years ago

GREAT! A pleasure!

SmasSive commented 6 years ago

Hey @Piasy ! Looks like the module GlideImageViewFactory is not well published: http://dl.bintray.com/piasy/maven/com/github/piasy/GlideImageViewFactory/1.5.2/

Piasy commented 6 years ago

It's strange that bintray didn't publish it automatically, I've published it manually, please try again.

SmasSive commented 6 years ago

Ok, now it's working! Thanks!