【发布时间】:2016-12-17 23:34:43
【问题描述】:
我决定使用Fresco,因为它可以解决我的问题:GIF 和WEBP 播放。
根据文档:http://frescolib.org/docs/animations.html
我可以使用这些代码自动播放动画:
Uri uri;
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setUri(uri)
.setAutoPlayAnimations(true)
. // other setters
.build();
mSimpleDraweeView.setController(controller);
但是,当我使用代码时,它只显示静态图像。
为了播放 GIF/WEBP,我还需要执行其他步骤吗?还是我误解了文档对“动画”的使用?
编辑:
附加信息,在使用 ControllerListener 时,我发现 onFinalImageSet() 中的 Animatable 返回为空。我不确定为什么。
我也尝试运行这个示例项目,但 .gif 也没有动画:https://github.com/kaedea/fresco-sample-usage
我正在使用 Nexus 5X 来测试 btw(版本 6.0.1)
【问题讨论】:
-
好的,问题是我没有添加支持 GIF 和 WebP 的模块