Search in sources :

Example 1 with AbstractDraweeControllerBuilder

use of com.facebook.drawee.controller.AbstractDraweeControllerBuilder in project fresco by facebook.

the class SimpleDraweeView method setImageRequest.

/**
 * Sets the image request
 *
 * @param request Image Request
 */
public void setImageRequest(ImageRequest request) {
    AbstractDraweeControllerBuilder controllerBuilder = mControllerBuilder;
    DraweeController controller = controllerBuilder.setImageRequest(request).setOldController(getController()).build();
    setController(controller);
}
Also used : AbstractDraweeControllerBuilder(com.facebook.drawee.controller.AbstractDraweeControllerBuilder) DraweeController(com.facebook.drawee.interfaces.DraweeController)

Example 2 with AbstractDraweeControllerBuilder

use of com.facebook.drawee.controller.AbstractDraweeControllerBuilder in project fresco by facebook.

the class InstrumentedDraweeView method setImageURI.

@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
    SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder().setUri(uri).setCallerContext(callerContext).setOldController(getController());
    if (controllerBuilder instanceof AbstractDraweeControllerBuilder) {
        ((AbstractDraweeControllerBuilder<?, ?, ?, ?>) controllerBuilder).setControllerListener(mListener);
    }
    setController(controllerBuilder.build());
}
Also used : AbstractDraweeControllerBuilder(com.facebook.drawee.controller.AbstractDraweeControllerBuilder) SimpleDraweeControllerBuilder(com.facebook.drawee.interfaces.SimpleDraweeControllerBuilder)

Example 3 with AbstractDraweeControllerBuilder

use of com.facebook.drawee.controller.AbstractDraweeControllerBuilder in project fresco by facebook.

the class InstrumentedDraweeView method setImageURI.

@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
    SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder().setUri(uri).setCallerContext(callerContext).setOldController(getController());
    if (mConfig.instrumentationEnabled && controllerBuilder instanceof AbstractDraweeControllerBuilder) {
        ((AbstractDraweeControllerBuilder<?, ?, ?, ?>) controllerBuilder).setControllerListener(mListener);
    }
    setController(controllerBuilder.build());
}
Also used : AbstractDraweeControllerBuilder(com.facebook.drawee.controller.AbstractDraweeControllerBuilder) SimpleDraweeControllerBuilder(com.facebook.drawee.interfaces.SimpleDraweeControllerBuilder)

Aggregations

AbstractDraweeControllerBuilder (com.facebook.drawee.controller.AbstractDraweeControllerBuilder)3 SimpleDraweeControllerBuilder (com.facebook.drawee.interfaces.SimpleDraweeControllerBuilder)2 DraweeController (com.facebook.drawee.interfaces.DraweeController)1