Package 

Class PreloadTarget

    • Method Summary

      Modifier and Type Method Description
      static <Z> PreloadTarget<Z> obtain(RequestManager requestManager, int width, int height) Returns a PreloadTarget.
      void onResourceReady(@NonNull() Z resource, @Nullable() Transition<out Object> transition) The method that will be called when the resource load has finished.
      void onLoadCleared(@Nullable() Drawable placeholder) A mandatory lifecycle callback that is called when a load is cancelled and its resourcesare freed.
      • Methods inherited from class com.mobwith.imgmodule.request.target.CustomTarget

        getRequest, getSize, onDestroy, onLoadFailed, onLoadStarted, onStart, onStop, removeCallback, setRequest
      • Methods inherited from class com.mobwith.imgmodule.request.target.Target

        onResourceReady
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • obtain

         static <Z> PreloadTarget<Z> obtain(RequestManager requestManager, int width, int height)

        Returns a PreloadTarget.

        Parameters:
        width - The width in pixels of the desired resource.
        height - The height in pixels of the desired resource.
      • onLoadCleared

         void onLoadCleared(@Nullable() Drawable placeholder)

        A mandatory lifecycle callback that is called when a load is cancelled and its resourcesare freed.

        You must ensure that any current Drawable received in onResourceReady is no longer used before redrawing the container (usually a View) or changing itsvisibility.

        Parameters:
        placeholder - The placeholder drawable to optionally show, or null.