Пример #1
0
 /**
  * Returns whether the image is stored in the disk cache.
  *
  * <p>If you have supplied your own cache key factory when configuring the pipeline, this method
  * may not work correctly. It will only work if the custom factory builds the cache key entirely
  * from the URI. If that is not the case, use {@link #isInDiskCache(ImageRequest)}.
  *
  * @param uri the uri for the image to be looked up.
  * @return true if the image was found in the disk cache, false otherwise.
  */
 public DataSource<Boolean> isInDiskCache(final Uri uri) {
   return isInDiskCache(ImageRequest.fromUri(uri));
 }
Пример #2
0
 /**
  * Returns whether the image is stored in the disk cache. Performs disk cache check synchronously.
  * It is not recommended to use this unless you know what exactly you are doing. Disk cache check
  * is a costly operation, the call will block the caller thread until the cache check is
  * completed.
  *
  * @param uri the uri for the image to be looked up.
  * @return true if the image was found in the disk cache, false otherwise.
  */
 public boolean isInDiskCacheSync(final Uri uri) {
   return isInDiskCacheSync(ImageRequest.fromUri(uri));
 }
 @Override
 public PipelineDraweeControllerBuilder setUri(@Nullable String uriString) {
   return super.setImageRequest(ImageRequest.fromUri(uriString));
 }
Пример #4
0
 /**
  * If you have supplied your own cache key factory when configuring the pipeline, this method may
  * not work correctly. It will only work if the custom factory builds the cache key entirely from
  * the URI. If that is not the case, use {@link #evictFromDiskCache(ImageRequest)}.
  *
  * @param uri The uri of the image to evict
  */
 public void evictFromDiskCache(final Uri uri) {
   evictFromDiskCache(ImageRequest.fromUri(uri));
 }
 @Override
 public PipelineDraweeControllerBuilder setUri(Uri uri) {
   return super.setImageRequest(ImageRequest.fromUri(uri));
 }