I am working on a project where I have a requirement to play a gif in an Android widget ImageView
. For this purpose I have tried all the possible ways by using Glide
and libraries like
https://github.com/felipecsl/GifImageView
https://github.com/koral--/android-gif-drawable
Problems I am facing
Glide - I couldn't load gif into an
ImageView
because of aRemoteView
property (i.e only bitmaps and resources can be assigned, Not drawables)Libraries - I couldn't use any third party libraries because all libraries extends
View
(SinceRemoteView
doesn't supportView
in the layout), CustomView cannot be also implemented because there is no ways to assign or call custom methods (SincesetImageViewResource
andsetImageViewBitmap
are only possible methods revealed inRemoteView
)
What I am trying to do:
Since I couldn't find any solution for this requirement, so I am trying to do my own methodology by downloading and breaking gif into multiple frames as Bitmap
and then planning to use those frames in the RemoteView
. Kindly help me if any other solutions can be implemented to achieve this feature. I have been working on this since for the past 7 days, but couldn't find any solutions for my requirement. Any sort of tips and suggestion would be very helpful for me. Thanks in advance.