All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bumptech.glide.load.resource.transcode.UnitTranscoder Maven / Gradle / Ivy

Go to download

A fast and efficient image loading library for Android focused on smooth scrolling.

The newest version!
package com.bumptech.glide.load.resource.transcode;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.engine.Resource;

/**
 * A simple {@link ResourceTranscoder} that simply returns the given resource.
 *
 * @param  The type of the resource that will be transcoded from and to.
 */
public class UnitTranscoder implements ResourceTranscoder {
  private static final UnitTranscoder UNIT_TRANSCODER = new UnitTranscoder<>();

  @SuppressWarnings("unchecked")
  public static  ResourceTranscoder get() {
    return (ResourceTranscoder) UNIT_TRANSCODER;
  }

  @Nullable
  @Override
  public Resource transcode(@NonNull Resource toTranscode, @NonNull Options options) {
    return toTranscode;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy