Back to Fresco

PipelineDraweeController

docs/javadoc/reference/com/facebook/drawee/backends/pipeline/PipelineDraweeController.html

3.6.044.0 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Packages | Classes

Summary: Inherited Fields | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]

public class

PipelineDraweeController

extends AbstractDraweeController<T, INFO>

| java.lang.Object | | ↳ | com.facebook.drawee.controller.AbstractDraweeController<T, INFO> | | | ↳ | com.facebook.drawee.backends.pipeline.PipelineDraweeController |

Class Overview

Drawee controller that bridges the image pipeline with SettableDraweeHierarchy.

The hierarchy's actual image is set to the image(s) obtained by the provided data source. The data source is automatically obtained and closed based on attach / detach calls.

Summary

| [Expand] Inherited Fields | | --- | | From class com.facebook.drawee.controller.AbstractDraweeController

| protected ControllerListener<INFO> | mControllerListener | | | protected ForwardingControllerListener2<INFO> | mControllerListener2 | | | protected Drawable | mDrawable | | | protected LoggingListener | mLoggingListener | |

|

Public Constructors
Public Methods
synchronized void
synchronized void
synchronized RequestListener
void
Initializes this controller with the new data source supplier, id and caller context.
boolean
Map<String, Object>
synchronized void
synchronized void
void
void
void
Sets the hierarchy.
String
Protected Methods
void
Drawable
CacheKey
CloseableReference<CloseableImage>
DataSource<CloseableReference<CloseableImage>>
Supplier<DataSource<CloseableReference<CloseableImage>>>
int
ImageInfo
Uri
Resources
synchronized void
void
void
void
void
updateDebugOverlay updates the debug overlay.

| [Expand] Inherited Methods | | --- | | From class com.facebook.drawee.controller.AbstractDraweeController

| void | addControllerListener(ControllerListener<? super INFO> controllerListener) Adds controller listener. | | void | addControllerListener2(ControllerListener2<INFO> controllerListener2) | | abstract Drawable | createDrawable(T image) | | Animatable | getAnimatable() For an animated image, returns an Animatable that lets clients control the animation. | | T | getCachedImage() | | Object | getCallerContext() Gets the analytic tag & caller context | | String | getContentDescription() Gets accessibility content description. | | ControllerListener<INFO> | getControllerListener() Gets controller listener for internal use. | | ControllerListener2<INFO> | getControllerListener2() | | Drawable | getControllerOverlay() Gets the controller overlay | | abstract DataSource<T> | getDataSource() | | GestureDetector | getGestureDetector() Gets gesture detector. | | DraweeHierarchy | getHierarchy() Gets the hierarchy | | String | getId() Gets the controller id. | | String | getImageClass(T image) | | int | getImageHash(T image) | | abstract INFO | getImageInfo(T image) | | LoggingListener | getLoggingListener() | | Uri | getMainUri() | | RetryManager | getRetryManager() Gets retry manager. | | void | initialize(String id, Object callerContext) Initializes this controller with the new id and caller context. | | abstract Map<String, Object> | obtainExtrasFromImage(INFO info) | | void | onAttach() Called when the view containing the hierarchy is attached to a window (either temporarily or permanently). | | boolean | onClick() | | void | onDetach() Called when the view containing the hierarchy is detached from a window (either temporarily or permanently). | | void | onImageLoadedFromCacheImmediately(String id, T cachedImage) | | boolean | onTouchEvent(MotionEvent event) Called when the view containing the hierarchy receives a touch event. | | void | onViewportVisibilityHint(boolean isVisibleInViewportHint) An optional hint whether the view containing the hierarchy is currently within the visible viewport or not. | | void | release() | | abstract void | releaseDrawable(Drawable drawable) | | abstract void | releaseImage(T image) | | void | removeControllerListener(ControllerListener<? super INFO> controllerListener) Removes controller listener. | | void | removeControllerListener2(ControllerListener2<INFO> controllerListener2) | | void | reportSubmit(DataSource<T> dataSource, INFO info) | | void | setContentDescription(String contentDescription) Sets accessibility content description. | | void | setControllerOverlay(Drawable controllerOverlay) Sets the controller overlay | | void | setControllerViewportVisibilityListener(ControllerViewportVisibilityListener controllerViewportVisibilityListener) Sets the controller viewport visibility listener | | void | setGestureDetector(GestureDetector gestureDetector) Sets gesture detector. | | void | setHierarchy(DraweeHierarchy hierarchy) Sets the hierarchy. | | void | setLoggingListener(LoggingListener loggingListener) | | void | setRetainImageOnFailure(boolean enabled) Sets whether to display last available image in case of failure. | | boolean | shouldHandleGesture() Returns whether the gesture should be handled by the controller | | void | submitRequest() | | String | toString() |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface com.facebook.drawee.components.DeferredReleaser.Releasable

| abstract void | release() |

| | From interface com.facebook.drawee.gestures.GestureDetector.ClickListener

| abstract boolean | onClick() |

| | From interface com.facebook.drawee.interfaces.DraweeController

| abstract Animatable | getAnimatable() For an animated image, returns an Animatable that lets clients control the animation. | | abstract String | getContentDescription() Gets the accessibility content description. | | abstract DraweeHierarchy | getHierarchy() Gets the hierarchy. | | abstract boolean | isSameImageRequest(DraweeController other) Returns whether other would fetch the same image as this. | | abstract void | onAttach() Called when the view containing the hierarchy is attached to a window (either temporarily or permanently). | | abstract void | onDetach() Called when the view containing the hierarchy is detached from a window (either temporarily or permanently). | | abstract boolean | onTouchEvent(MotionEvent event) Called when the view containing the hierarchy receives a touch event. | | abstract void | onViewportVisibilityHint(boolean isVisibleInViewportHint) An optional hint whether the view containing the hierarchy is currently within the visible viewport or not. | | abstract void | setContentDescription(String contentDescription) Sets the accessibility content description. | | abstract void | setHierarchy(DraweeHierarchy hierarchy) Sets a new hierarchy. |

|

Public Constructors

public PipelineDraweeController(Resources resources, DeferredReleaser deferredReleaser, DrawableFactory animatedDrawableFactory, Executor uiThreadExecutor, MemoryCache<CacheKey, CloseableImage> memoryCache, ImmutableList<DrawableFactory> globalDrawableFactories)

Public Methods

public synchronized void addImageOriginListener(ImageOriginListener imageOriginListener)

public synchronized void addRequestListener(RequestListener requestListener)

public synchronized RequestListener getRequestListener()

public void initialize(Supplier<DataSource<CloseableReference<CloseableImage>>> dataSourceSupplier, String id, CacheKey cacheKey, Object callerContext, ImmutableList<DrawableFactory> customDrawableFactories, ImageOriginListener imageOriginListener)

Initializes this controller with the new data source supplier, id and caller context. This allows for reusing of the existing controller instead of instantiating a new one. This method should be called when the controller is in detached state.

Parameters

| dataSourceSupplier | data source supplier | | id | unique id for this controller | | callerContext | tag and context for this controller |

public boolean isSameImageRequest(DraweeController other)

public Map<String, Object> obtainExtrasFromImage(ImageInfo info)

public synchronized void removeImageOriginListener(ImageOriginListener imageOriginListener)

public synchronized void removeRequestListener(RequestListener requestListener)

public void setCustomDrawableFactories(ImmutableList<DrawableFactory> customDrawableFactories)

public void setDrawDebugOverlay(boolean drawDebugOverlay)

public void setHierarchy(DraweeHierarchy hierarchy)

Sets the hierarchy.

The controller should be detached when this method is called.

Parameters

| hierarchy | This must be an instance of SettableDraweeHierarchy |

public String toString()

Protected Methods

protected void clearImageOriginListeners()

protected Drawable createDrawable(CloseableReference<CloseableImage> image)

protected CacheKey getCacheKey()

protected CloseableReference<CloseableImage> getCachedImage()

protected DataSource<CloseableReference<CloseableImage>> getDataSource()

protected Supplier<DataSource<CloseableReference<CloseableImage>>> getDataSourceSupplier()

protected int getImageHash(CloseableReference<CloseableImage> image)

protected ImageInfo getImageInfo(CloseableReference<CloseableImage> image)

protected Uri getMainUri()

protected Resources getResources()

protected synchronized void initializePerformanceMonitoring(ImagePerfDataListener imagePerfDataListener, AbstractDraweeControllerBuilder<PipelineDraweeControllerBuilder, ImageRequest, CloseableReference<CloseableImage>, ImageInfo> builder, Supplier<Boolean> asyncLogging)

protected void onImageLoadedFromCacheImmediately(String id, CloseableReference<CloseableImage> cachedImage)

protected void releaseDrawable(Drawable drawable)

protected void releaseImage(CloseableReference<CloseableImage> image)

protected void updateDebugOverlay(CloseableImage image, DebugControllerOverlayDrawable debugOverlay)

updateDebugOverlay updates the debug overlay. Subclasses of PipelineDraweeController can override this method (and call super) to provide additional debug information.

+Generated by Doclava. +