當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。