frapontillo/ImageViewEx

Scale ImageViewEx Object

MichalPomorski opened this issue · 4 comments

Hello

At the outset I would like to say that your library works well in comparison with other libraries of this type.

However, I have a problem, and I would like to ask if it can be improved / changed.

I mean scaling animation, as is the case with graphics ImageView.
None of the parameter android: scaleType in the layout does not change the appearance of animation, as it is when I try to set it from the Activity.

By default, I mean the effect that you would normally get with android: scaleType = "fitCenter".

I would be grateful for your response and help.

Regards,
Michael

Thanks for the compliments. Unsatisfaction for other alternative methods of displaying animated GIFs is what made us create this library in the first place, so we're happy to see that it is appreciated.

Regarding the image scaling, it's not applied when using the Movie object to decode and display GIFs, because that's never been a use case for the context the library has been written for.

You can implement scaling by editing lines around line 572, in ImageViewEx's onDraw(). I don't know if and when we will implement it ourselves, so you might fork this repo and then submit a pull request, we'll be happy to merge in.

Hello Michael,
we're going to try and sort this thing out as soon as we get some time, so thank you for pointing that out. Please feel free to report any other unexpected behaviour or bug you may encounter during the use of the library.

@MichalPomorski, I have implemented the behavior you suggested in 6be8e5b (develop branch).
If you still find this feature useful could you please try it out and give us some feedback?
Thank you.

@frapontillo , thanks, in m app, I have used, webview, but its still buged on some devices, with android 2+, so of course ill try you fix.

Thanks :)