public interface

DraweeController

com.facebook.drawee.interfaces.DraweeController
Known Indirect Subclasses

Class Overview

Interface that represents a Drawee controller used by a DraweeView.

The view forwards events to the controller. The controller controls its hierarchy based on those events.

Summary

Public Methods
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 Methods

public abstract Animatable getAnimatable ()

For an animated image, returns an Animatable that lets clients control the animation.

Returns
  • animatable, or null if the image is not animated or not loaded yet

public abstract String getContentDescription ()

Gets the accessibility content description.

Returns
  • content description, or null if the image has no content description

public abstract DraweeHierarchy getHierarchy ()

Gets the hierarchy.

public abstract boolean isSameImageRequest (DraweeController other)

Returns whether other would fetch the same image as this.

public abstract void onAttach ()

Called when the view containing the hierarchy is attached to a window (either temporarily or permanently).

public abstract void onDetach ()

Called when the view containing the hierarchy is detached from a window (either temporarily or permanently).

public abstract boolean onTouchEvent (MotionEvent event)

Called when the view containing the hierarchy receives a touch event.

Returns
  • true if the event was handled by the controller, false otherwise

public abstract void onViewportVisibilityHint (boolean isVisibleInViewportHint)

An optional hint whether the view containing the hierarchy is currently within the visible viewport or not.

public abstract void setContentDescription (String contentDescription)

Sets the accessibility content description.

public abstract void setHierarchy (DraweeHierarchy hierarchy)

Sets a new hierarchy.