本文整理汇总了Java中com.facebook.drawee.backends.pipeline.Fresco.newDraweeControllerBuilder方法的典型用法代码示例。如果您正苦于以下问题:Java Fresco.newDraweeControllerBuilder方法的具体用法?Java Fresco.newDraweeControllerBuilder怎么用?Java Fresco.newDraweeControllerBuilder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.facebook.drawee.backends.pipeline.Fresco
的用法示例。
在下文中一共展示了Fresco.newDraweeControllerBuilder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadImage
import com.facebook.drawee.backends.pipeline.Fresco; //导入方法依赖的package包/类
public static void loadImage(final PhotoDraweeView mPhotoDraweeView,
Uri uri) {
PipelineDraweeControllerBuilder controller = Fresco.newDraweeControllerBuilder();
controller.setUri(uri);
controller.setAutoPlayAnimations(true);
controller.setOldController(mPhotoDraweeView.getController());
controller.setControllerListener(new BaseControllerListener<ImageInfo>() {
@Override
public void onFinalImageSet(String id, ImageInfo imageInfo, Animatable animatable) {
super.onFinalImageSet(id, imageInfo, animatable);
if (imageInfo == null || mPhotoDraweeView == null) {
return;
}
mPhotoDraweeView.update(imageInfo.getWidth(), imageInfo.getHeight());
}
});
mPhotoDraweeView.setController(controller.build());
}
示例2: init
import com.facebook.drawee.backends.pipeline.Fresco; //导入方法依赖的package包/类
@Override
protected void init() {
super.init();
transparentStatusBar();
ButterKnife.bind(this);
url = getIntent().getStringExtra("url");
PipelineDraweeControllerBuilder controller = Fresco.newDraweeControllerBuilder();
controller.setUri(Uri.parse(url));
controller.setAutoPlayAnimations(true);
controller.setOldController(photoDraweeView.getController());
controller.setControllerListener(new BaseControllerListener<ImageInfo>() {
@Override
public void onFinalImageSet(String id, ImageInfo imageInfo, Animatable animatable) {
super.onFinalImageSet(id, imageInfo, animatable);
if (imageInfo == null || photoDraweeView == null) {
return;
}
photoDraweeView.update(imageInfo.getWidth(), imageInfo.getHeight());
normalScale = photoDraweeView.getScale();
}
});
photoDraweeView.setController(controller.build());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
String name = getIntent().getStringExtra("transition_name");
photoDraweeView.setTransitionName(name);
getWindow().setSharedElementEnterTransition(DraweeTransition.createTransitionSet(
ScalingUtils.ScaleType.CENTER_CROP, ScalingUtils.ScaleType.FIT_CENTER));
getWindow().setSharedElementReturnTransition(DraweeTransition.createTransitionSet(
ScalingUtils.ScaleType.FIT_CENTER, ScalingUtils.ScaleType.CENTER_CROP));
}
}
示例3: createShadowNodeInstance
import com.facebook.drawee.backends.pipeline.Fresco; //导入方法依赖的package包/类
@Override
public FrescoBasedReactTextInlineImageShadowNode createShadowNodeInstance() {
return new FrescoBasedReactTextInlineImageShadowNode(
(mDraweeControllerBuilder != null) ?
mDraweeControllerBuilder :
Fresco.newDraweeControllerBuilder(),
mCallerContext
);
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:10,代码来源:FrescoBasedReactTextInlineImageViewManager.java
示例4: getDraweeControllerBuilder
import com.facebook.drawee.backends.pipeline.Fresco; //导入方法依赖的package包/类
public AbstractDraweeControllerBuilder getDraweeControllerBuilder() {
if (mDraweeControllerBuilder == null) {
mDraweeControllerBuilder = Fresco.newDraweeControllerBuilder();
}
return mDraweeControllerBuilder;
}