Fresco can not load local xxx.gif resource
Hi: My name is SunFusheng. I want to load local xxx.gif, but fresco can not. Can it support?
Yes, Fresco does support GIF images. In order to determine why your GIF fails to load we are going to need more information. If you can share the GIF image that would be the easiest way.
The following code: Uri uri = Uri.parse("android.resource://" + getActivity().getPackageName() + "/" + R.drawable.mygif); DraweeController controller = Fresco.newDraweeControllerBuilder() .setUri(uri) .setAutoPlayAnimations(true) .build(); sdvGif.setController(controller); I put mygif in drawable dir. it does not work.
Any chance you can upload that GIF file so we can try it ourselves? Have you followed the troubleshooting steps?
I try it again! Thank you!
I solved the problem by modifing following code: Uri uri = Uri.parse("res://" + getActivity().getPackageName() + "/" + R.drawable.mygif); Thanks very much!