Package 

Class BaseTarget

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Request request
    • Method Summary

      Modifier and Type Method Description
      Request getRequest() Retrieves the current request for this target, should not be called outside of ImageModule.
      void setRequest(@Nullable() Request request) Sets the current request for this target to retain, should not be called outside of ImageModule.
      void onLoadCleared(@Nullable() Drawable placeholder) A mandatory lifecycle callback that is called when a load is cancelled and its resourcesare freed.
      void onLoadStarted(@Nullable() Drawable placeholder) A lifecycle callback that is called when a load is started.
      void onLoadFailed(@Nullable() Drawable errorDrawable) A mandatory lifecycle callback that is called when a load fails.
      void onStart() Callback for when onStart} or is called.
      void onStop() Callback for when onStop} or } is called.
      void onDestroy() Callback for when onDestroy} or is called.
      • Methods inherited from class com.mobwith.imgmodule.request.target.Target

        getSize, onResourceReady, removeCallback
      • Methods inherited from class java.lang.Object

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

      • getRequest

        @Nullable() Request getRequest()

        Retrieves the current request for this target, should not be called outside of ImageModule.

      • setRequest

         void setRequest(@Nullable() Request request)

        Sets the current request for this target to retain, should not be called outside of ImageModule.

      • 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.
      • onLoadStarted

         void onLoadStarted(@Nullable() Drawable placeholder)

        A lifecycle callback that is called when a load is started.

        Note - This may not be called for every load, it is possible for example for loads to failbefore the load starts (when the model object is null).

        Note - This method may be called multiple times before any other lifecycle method is called.Loads can be paused and restarted due to lifecycle or connectivity events and each restart maycause a call here.

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

         void onLoadFailed(@Nullable() Drawable errorDrawable)

        A mandatory lifecycle callback that is called when a load fails.

        Note - This may be called before onLoadStarted if the model object is null.

        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:
        errorDrawable - The error drawable to optionally show, or null.
      • onStop

         void onStop()

        Callback for when onStop} or } is called.