本文整理匯總了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;
}