当前位置: 首页>>代码示例>>Java>>正文


Java Fresco.newDraweeControllerBuilder方法代码示例

本文整理汇总了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());
}
 
开发者ID:lennyup,项目名称:react-native-udesk,代码行数:19,代码来源:UdeskUtil.java

示例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));
    }
}
 
开发者ID:HStanN,项目名称:TakeRest,代码行数:32,代码来源:PhotoViewActivity.java

示例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;
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:7,代码来源:RCTImageViewManager.java


注:本文中的com.facebook.drawee.backends.pipeline.Fresco.newDraweeControllerBuilder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。