docs/javadoc/reference/com/facebook/drawee/view/DraweeHolder.html
|
|
Summary: Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public class
extends Object
implements VisibilityCallback
| java.lang.Object | | ↳ | com.facebook.drawee.view.DraweeHolder<DH extends com.facebook.drawee.interfaces.DraweeHierarchy> |
A holder class for Drawee controller and hierarchy.
Drawee users, should, as a rule, use DraweeView or its subclasses. There are situations where custom views are required, however, and this class is for those circumstances.
Each DraweeHierarchy object should be contained in a single instance of this class.
Users of this class must call setBounds(Rect) on the top-level drawable of the DraweeHierarchy. Otherwise the drawable will not be drawn.
The containing view must also call onDetach() from its onStartTemporaryDetach() and onDetachedFromWindow() methods. It must call onAttach() from its onFinishTemporaryDetach() and onAttachedToWindow() methods.
| Public Constructors |
|---|
| Creates a new instance of DraweeHolder. |
| Public Methods |
|---|
| static <DH extends DraweeHierarchy> DraweeHolder<DH> |
| Creates a new instance of DraweeHolder that detaches / attaches controller whenever context notifies it about activity's onStop and onStart callbacks. |
| DraweeController |
| Gets the controller if set, null otherwise. |
| DH |
| Gets the drawee hierarchy if set, throws NPE otherwise. |
| Drawable |
| Gets the top-level drawable if hierarchy is set, null otherwise. |
| boolean |
| Returns whether the hierarchy is set or not. |
| boolean |
| Checks whether the view that uses this holder is currently attached to a window. |
| boolean |
| Returns whether currently set controller is valid: not null and attached to the hierarchy that is held by the holder |
| void |
| Gets the controller ready to display the image. |
| void |
| Releases resources used to display the image. |
| void |
| Callback used to notify about top-level-drawable being drawn. |
| boolean |
| Forwards the touch event to the controller. |
| void |
| Callback used to notify about top-level-drawable's visibility changes. |
| void |
| For future use. |
| void |
| Sets a new controller. |
| void |
| Sets the drawee hierarchy. |
| String |
| Protected Methods |
|---|
| DraweeEventTracker |
| [Expand] Inherited Methods | | --- | | 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.drawable.VisibilityCallback
| abstract void | onDraw() Called when the drawable gets drawn. | | abstract void | onVisibilityChange(boolean visible) Called when the drawable's visibility changes. |
|
Creates a new instance of DraweeHolder.
Creates a new instance of DraweeHolder that detaches / attaches controller whenever context notifies it about activity's onStop and onStart callbacks.
Gets the controller if set, null otherwise.
Gets the drawee hierarchy if set, throws NPE otherwise.
Gets the top-level drawable if hierarchy is set, null otherwise.
Returns whether the hierarchy is set or not.
Checks whether the view that uses this holder is currently attached to a window.
onAttach()onDetach()Returns whether currently set controller is valid: not null and attached to the hierarchy that is held by the holder
Gets the controller ready to display the image.
The containing view must call this method from both onFinishTemporaryDetach() and onAttachedToWindow().
Releases resources used to display the image.
The containing view must call this method from both onStartTemporaryDetach() and onDetachedFromWindow().
Callback used to notify about top-level-drawable being drawn.
Forwards the touch event to the controller.
| event | touch event to handle |
Callback used to notify about top-level-drawable's visibility changes.
| isVisible | whether or not the drawable is visible |
For future use.
Sets a new controller.
Sets the drawee hierarchy.
+Generated by Doclava. +