Class DrawableBytesTranscoder

  • All Implemented Interfaces:
    ResourceTranscoder<android.graphics.drawable.Drawable,​byte[]>

    public final class DrawableBytesTranscoder
    extends java.lang.Object
    implements ResourceTranscoder<android.graphics.drawable.Drawable,​byte[]>
    Obtains byte[] from BitmapDrawables by delegating to a ResourceTranscoder for Bitmaps to byte[]s.
    • Method Detail

      • transcode

        @Nullable
        public Resource<byte[]> transcode​(@NonNull
                                          Resource<android.graphics.drawable.Drawable> toTranscode,
                                          @NonNull
                                          Options options)
        Description copied from interface: ResourceTranscoder
        Transcodes the given resource to the new resource type and returns the new resource.
        Specified by:
        transcode in interface ResourceTranscoder<android.graphics.drawable.Drawable,​byte[]>
        Parameters:
        toTranscode - The resource to transcode.