Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glide 支持 DiskCacheStrategy.ALL 和 DiskCacheStrategy.RESOURCE 示意代码 #213

Open
tudou0digua opened this issue Feb 23, 2024 · 0 comments

Comments

@tudou0digua
Copy link

@GlideModule
public class GlideAnimationModule extends LibraryGlideModule {
@OverRide
public void registerComponents(@nonnull Context context, @nonnull Glide glide, @nonnull Registry registry) {
super.registerComponents(context, glide, registry);
.......
registry.append(FrameSeqDecoder.class, new ApngDrawableEncoder());
}
}

public class ApngDrawableEncoder implements ResourceEncoder {

@NonNull
@Override
public EncodeStrategy getEncodeStrategy(@NonNull Options options) {
    return EncodeStrategy.SOURCE;
}

@Override
public boolean encode(@NonNull Resource<FrameSeqDecoder> data, @NonNull File file, @NonNull Options options) {
    return false;
}

}

大佬看看这个demo是否有啥问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant