@Override
        public void onFinalImageSet(
            long id, int imageOrigin, @Nullable ImageInfo imageInfo, @Nullable Drawable drawable) {
          mHandler.post(
              new Runnable() {
                @Override
                public void run() {
                  Toast.makeText(
                          getContext(),
                          String.format(
                              (Locale) null,
                              "Image loaded: controllerId=%s, origin=%s",
                              id,
                              ImageOriginUtils.toString(imageOrigin)),
                          Toast.LENGTH_SHORT)
                      .show();
                }
              });
        }
Fragment that illustrates how to prefetch images to disk cache so that they load faster when
finally displayed.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imagepipeline/ImagePipelinePrefetchFragment.java