public class

SimpleDraweeView

extends GenericDraweeView
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ImageView
       ↳ com.facebook.drawee.view.DraweeView<DH extends com.facebook.drawee.interfaces.DraweeHierarchy>
         ↳ com.facebook.drawee.view.GenericDraweeView
           ↳ com.facebook.drawee.view.SimpleDraweeView

Class Overview

This view takes a uri as input and internally builds and sets a controller.

This class must be statically initialized in order to be used. If you are using the Fresco image pipeline, use initialize(Context) to do this.

Summary

[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
SimpleDraweeView(Context context, GenericDraweeHierarchy hierarchy)
SimpleDraweeView(Context context)
SimpleDraweeView(Context context, AttributeSet attrs)
SimpleDraweeView(Context context, AttributeSet attrs, int defStyle)
SimpleDraweeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
static void initialize(Supplier<? extends AbstractDraweeControllerBuilder> draweeControllerBuilderSupplier)
Initializes SimpleDraweeView with supplier of Drawee controller builders.
void setActualImageResource(int resourceId, Object callerContext)
Sets the actual image resource to the given resource ID.
void setActualImageResource(int resourceId)
Sets the actual image resource to the given resource ID.
void setImageRequest(ImageRequest request)
Sets the image request
void setImageResource(int resId)
This method is deprecated. Use setController(DraweeController) instead.
void setImageURI(Uri uri)
Displays an image given by the uri.
void setImageURI(Uri uri, Object callerContext)
Displays an image given by the uri.
void setImageURI(String uriString)
Displays an image given by the uri string.
void setImageURI(String uriString, Object callerContext)
Displays an image given by the uri string.
static void shutDown()
Shuts SimpleDraweeView down.
Protected Methods
AbstractDraweeControllerBuilder getControllerBuilder()
[Expand]
Inherited Methods
From class com.facebook.drawee.view.GenericDraweeView
From class com.facebook.drawee.view.DraweeView
From class android.widget.ImageView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public SimpleDraweeView (Context context, GenericDraweeHierarchy hierarchy)

public SimpleDraweeView (Context context)

public SimpleDraweeView (Context context, AttributeSet attrs)

public SimpleDraweeView (Context context, AttributeSet attrs, int defStyle)

public SimpleDraweeView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public static void initialize (Supplier<? extends AbstractDraweeControllerBuilder> draweeControllerBuilderSupplier)

Initializes SimpleDraweeView with supplier of Drawee controller builders.

public void setActualImageResource (int resourceId, Object callerContext)

Sets the actual image resource to the given resource ID.

Similar to setImageResource(int), this sets the displayed image to the given resource. However, setImageResource(int) bypasses all Drawee functionality and makes the view act as a normal android.widget.ImageView, whereas this method keeps all of the Drawee functionality, including the DraweeHierarchy.

Parameters
resourceId the resource ID to use.
callerContext caller context

public void setActualImageResource (int resourceId)

Sets the actual image resource to the given resource ID.

Similar to setImageResource(int), this sets the displayed image to the given resource. However, setImageResource(int) bypasses all Drawee functionality and makes the view act as a normal android.widget.ImageView, whereas this method keeps all of the Drawee functionality, including the DraweeHierarchy.

Parameters
resourceId the resource ID to use.

public void setImageRequest (ImageRequest request)

Sets the image request

Parameters
request Image Request

public void setImageResource (int resId)

This method is deprecated.
Use setController(DraweeController) instead.

This method will bypass all Drawee-related functionality. If you want to keep this functionality, take a look at setActualImageResource(int) and setActualImageResource(int, Object)}.

Parameters
resId the resource ID

public void setImageURI (Uri uri)

Displays an image given by the uri.

Parameters
uri uri of the image

public void setImageURI (Uri uri, Object callerContext)

Displays an image given by the uri.

Parameters
uri uri of the image
callerContext caller context

public void setImageURI (String uriString)

Displays an image given by the uri string.

Parameters
uriString uri string of the image

public void setImageURI (String uriString, Object callerContext)

Displays an image given by the uri string.

Parameters
uriString uri string of the image
callerContext caller context

public static void shutDown ()

Shuts SimpleDraweeView down.

Protected Methods

protected AbstractDraweeControllerBuilder getControllerBuilder ()