【问题标题】:Show GIF image full screen using Fresco library使用 Fresco 库全屏显示 GIF 图像
【发布时间】:2019-06-30 11:08:44
【问题描述】:

我正在使用Fresco 库来全屏显示图像。如何使用该库全屏显示动画 GIF 图像?还有其他最优解吗?

【问题讨论】:

    标签: android gif fresco


    【解决方案1】:

    您必须将动画 GIF 解码的依赖项添加到您的 Gradle 文件中:

    implementation 'com.facebook.fresco:animated-gif:1.12.1'
    

    然后,只需将图像加载到SimpleDraweeView

    mSimpleDraweeView.setController(Fresco.newDraweeControllerBuilder()
            .setAutoPlayAnimations(true)
            .setOldController(simpleDraweeView.getController())
            .setUri(yourGifUrl)
            .build());
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 2021-12-15
      • 1970-01-01
      • 2016-05-20
      • 2014-07-22
      相关资源
      最近更新 更多