alin-rautoiu / mastodroid

An android client for the Mastodon social network.
13 stars 4 forks source link

Animated gifs won't play #32

Open EmiMidnight opened 7 years ago

EmiMidnight commented 7 years ago

While Mastodon supports animated gifs, these don't play in Mastodroid. This is probably already known but it's due to Picasso not supporting animations.

Have you ever considered switching to something different, like Glide for example? Alternatively one could just spawn a webview for the gif, but I feel like that would be sort of a clunky solution.

charlag commented 7 years ago

Yeah, it's known and pretty much expected because no one did anything to support them. We Can give them limited support, for example only in profiles (like you open the profile and you see the gif playing but it doesn't move in the toot). I don't mind switching, don't know about @alin-rautoiu but I think we should check that it's absolutely necessary first.

EmiMidnight commented 7 years ago

Alright! Personally I think they do not even need to play on the timeline itself, but they should play when they're full screen. I'll check if there's a solution that does not involve swapping libraries!

alin-rautoiu commented 7 years ago

I think Glide can load GIFs somehow and it's pretty similar to Picasso so changing shouldn't be that much of a headache. If you want to look into it.

EmiMidnight commented 7 years ago

I tested out replacing picasso with glide and it's working out fairly okay! Gifs now play fine. :) On the timeline however only avatars will play their animations. I've set it up this way because playing media gif animations was too slow and resulted in some of the photo medias taking too long to load for my taste. They do play when you click on them however, I feel like this makes for a more relaxing experience.

This also fixed the bug where clicking on a video would crash the app, it now opens the thumbnail in the imageview, although I plan on figuring out a better way of handling video. (either open them in browser, or even better: show a video player.)

There's a small bug where in the user screen the header image didn't want to get a proper size. I've fiddled around with it and my current workaround is to set a minimum height. This looks fine on my phone (note 4) in both portrait and landscape mode but I think it might be tested for more obscure display ratios.

alin-rautoiu commented 7 years ago

Seems to be on the right track, then.