com.facebook.drawee.interfaces.SimpleDraweeControllerBuilder Java Examples

The following examples show how to use com.facebook.drawee.interfaces.SimpleDraweeControllerBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WatchDraweeImage.java    From ImageLoadPK with Apache License 2.0 5 votes vote down vote up
@Override
public void setImageURI(Uri uri) {
    super.setImageURI(uri);
    SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder().setUri(uri);
    if (controllerBuilder instanceof AbstractDraweeControllerBuilder) {
        ((AbstractDraweeControllerBuilder) controllerBuilder).setControllerListener(mControllerListener);
    }
    setController(controllerBuilder.build());

}
 
Example #2
Source File: InstrumentedDraweeView.java    From fresco with MIT License 5 votes vote down vote up
@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());
}
 
Example #3
Source File: InstrumentedDraweeView.java    From fresco with MIT License 5 votes vote down vote up
@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());
}
 
Example #4
Source File: FrescoConfig.java    From BlueBoard with Apache License 2.0 5 votes vote down vote up
public static SimpleDraweeControllerBuilder getSimpleDraweeControllerBuilder(SimpleDraweeControllerBuilder sdcb, Uri uri, Object callerContext, DraweeController draweeController) {
        SimpleDraweeControllerBuilder controllerBuilder = sdcb
                .setUri(uri)
                .setCallerContext(callerContext)
//              .setAspectRatio(1.33f);//宽高缩放比
                .setOldController(draweeController);
        return controllerBuilder;
    }
 
Example #5
Source File: SimpleDraweeView.java    From FanXin-based-HuanXin with GNU General Public License v2.0 4 votes vote down vote up
/** Initializes {@link SimpleDraweeView} with supplier of Drawee controller builders. */
public static void initialize(
    Supplier<? extends SimpleDraweeControllerBuilder> draweeControllerBuilderSupplier) {
  sDraweeControllerBuilderSupplier = draweeControllerBuilderSupplier;
}
 
Example #6
Source File: SimpleDraweeView.java    From FanXin-based-HuanXin with GNU General Public License v2.0 4 votes vote down vote up
protected SimpleDraweeControllerBuilder getControllerBuilder() {
  return mSimpleDraweeControllerBuilder;
}