2016-08-11 2 views
2

GIFWEBP 재생 : 내 문제의 해결책을 제공하므로 Fresco을 사용하기로 결정했습니다. 문서에 따르면 Fresco Android GIF/WEBP 애니메이션 재생 안 함

: 나는 코드를 사용하는 경우

Uri uri; 
    DraweeController controller = Fresco.newDraweeControllerBuilder() 
     .setUri(uri) 
     .setAutoPlayAnimations(true) 
     . // other setters 
     .build(); 
    mSimpleDraweeView.setController(controller); 

그러나, 그것은 단지 정적 이미지를 표시합니다 나는 자동으로 애니메이션을 재생하려면 다음 코드를 사용할 수 있습니다 http://frescolib.org/docs/animations.html

.

GIF/WEBP를 재생하려면 다른 단계가 필요합니까? 또는 문서의 '애니메이션'사용을 오해하고 있습니까?

는 편집 :

추가 정보를 원하시면하는 ControllerListener를 사용시, 나는 onFinalImageSet의 애니메이션 반환()가 null 인 것을 알아 냈다. 이유가 확실하지 않습니다.

또한이 샘플 프로젝트를 실행 시도뿐만 아니라 .gif 중요 애니메이션하지 않습니다 내가 BTW 테스트하기위한 넥서스 5 배를 사용하고 https://github.com/kaedea/fresco-sample-usage

(버전 6.0.1)

+0

괜찮습니다. GIF 및 WebP 지원 모듈을 추가하지 않았습니다. – kishidp

답변

6

가 있는지 확인하십시오 당신이 Gradle dependencies for animations을 추가하십시오 :

dependencies { 
    // If your app supports Android versions before Ice Cream Sandwich (API level 14) 
    compile 'com.facebook.fresco:animated-base-support:1.2.0' 

    // For animated GIF support 
    compile 'com.facebook.fresco:animated-gif:1.2.0' 

    // For WebP support, including animated WebP 
    compile 'com.facebook.fresco:animated-webp:1.2.0' 
    compile 'com.facebook.fresco:webpsupport:1.2.0' 

    // For WebP support, without animations 
    compile 'com.facebook.fresco:webpsupport:1.2.0' 
}