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


Java PhotoDraweeView类代码示例

本文整理汇总了Java中me.relex.photodraweeview.PhotoDraweeView的典型用法代码示例。如果您正苦于以下问题:Java PhotoDraweeView类的具体用法?Java PhotoDraweeView怎么用?Java PhotoDraweeView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PhotoDraweeView类属于me.relex.photodraweeview包,在下文中一共展示了PhotoDraweeView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import me.relex.photodraweeview.PhotoDraweeView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);

    try {
        if (!Fresco.hasBeenInitialized()) {
            UdeskSDKManager.getInstance().init(this);
        }
        setContentView(R.layout.udesk_zoom_imageview);
        zoomImageView = (PhotoDraweeView) findViewById(R.id.udesk_zoom_imageview);
        Bundle bundle = getIntent().getExtras();
        uri = bundle.getParcelable("image_path");
        UdeskUtil.loadImage(zoomImageView, uri);
        saveIdBtn = findViewById(R.id.udesk_zoom_save);
        saveIdBtn.setOnClickListener(this);
    } catch (Exception e) {
        e.printStackTrace();
    }catch (OutOfMemoryError error){
        error.printStackTrace();
    }

}
 
开发者ID:lennyup,项目名称:react-native-udesk,代码行数:23,代码来源:UdeskZoomImageActivty.java

示例2: loadImage

import me.relex.photodraweeview.PhotoDraweeView; //导入依赖的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

示例3: showNormalImage

import me.relex.photodraweeview.PhotoDraweeView; //导入依赖的package包/类
private View showNormalImage(ViewGroup container, final int position) {

        RelativeLayout layout = (RelativeLayout) LayoutInflater.from(context).inflate(R.layout.normal_img_layout, container, false);
        PhotoDraweeView imageView = (PhotoDraweeView) layout.findViewById(R.id.image_item);

        String imageUri = images.get(position).getUri();
        Uri show = Uri.parse((imageUri.startsWith("http")) ? imageUri : (imageUri.startsWith("file://")) ? imageUri : "file://" + imageUri);
        imageView.setPhotoUri(show);
        imageView.setOnViewTapListener(new OnViewTapListener() {
            @Override
            public void onViewTap(View view, float x, float y) {
                Toast.makeText(context, "点击可以退出", Toast.LENGTH_SHORT).show();
            }
        });

        container.addView(layout);

        return layout;
    }
 
开发者ID:CarGuo,项目名称:FrescoUtils,代码行数:20,代码来源:ImageAdapter.java

示例4: instantiateItem

import me.relex.photodraweeview.PhotoDraweeView; //导入依赖的package包/类
@Override
public View instantiateItem(ViewGroup container, final int position) {

    LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = layoutInflater.inflate(R.layout.item_photoview, container, false);
    final PhotoDraweeView photoView = (PhotoDraweeView) view.findViewById(R.id.photo_view);
    photoView.setPhotoUri(Uri.parse(images.get(position)));
    container.addView(view, 0);
    return view;
}
 
开发者ID:24ark,项目名称:CategorizedGalleryView,代码行数:11,代码来源:ImagesViewPagerAdapter.java


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