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


Java ImageInfo.setBigImageUrl方法代码示例

本文整理汇总了Java中com.lzy.ninegrid.ImageInfo.setBigImageUrl方法的典型用法代码示例。如果您正苦于以下问题:Java ImageInfo.setBigImageUrl方法的具体用法?Java ImageInfo.setBigImageUrl怎么用?Java ImageInfo.setBigImageUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.lzy.ninegrid.ImageInfo的用法示例。


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

示例1: uploadImages

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
public List<ImageInfo> uploadImages (final List<String> imagesPaths){
    if (imagesPaths != null) {
        List<ImageInfo> imageInfos = new ArrayList<>();
        for (String imagesPath : imagesPaths) {
            String imageType = getImageType(imagesPath);
            if (imageType != null){
                try {
                    AVFile avFile = AVFile.withAbsoluteLocalPath(getImageName(imageType), imagesPath);
                    AvObjectSaveHelper.runSaveFileSync(avFile);
                    ImageInfo imageInfo = new ImageInfo();
                    imageInfo.setThumbnailUrl(avFile.getThumbnailUrl(true,100,100));
                    imageInfo.setBigImageUrl(avFile.getUrl());
                    imageInfos.add(imageInfo);
                }catch (Exception e){
                    NLog.e(TagUtil.makeTag(FileStorageHelper.class),e);
                }
            }
        }
        return imageInfos;
    }
    return null;
}
 
开发者ID:zuoweitan,项目名称:Hitalk,代码行数:23,代码来源:FileStorageHelper.java

示例2: onActivityResult

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == RESULT_OK) {
        switch (requestCode) {
            case REQUEST_CODE:
                String type = data.getStringExtra(TypeActivity.TYPE);
                tvType.setText(type);
                break;
            case REQUEST_CODE_CHOOSE:
                mSelected = Matisse.obtainResult(data);
                List<ImageInfo> imageInfoList = new ArrayList<>();
                Log.e("PHOTO", mSelected.toString());
                for (int i = 0; i < mSelected.size(); i++) {
                    ImageInfo info = new ImageInfo();
                    info.setThumbnailUrl(mSelected.get(i).toString());
                    info.setBigImageUrl(mSelected.get(i).toString());
                    imageInfoList.add(info);
                }
                nineGridView.setAdapter(new NineGridViewClickAdapter(this, imageInfoList));
                break;
        }
    }
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:25,代码来源:PubDynamicActivity.java

示例3: showBigImage

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
private void showBigImage(NeiHanContentBean.DataBean.GroupBean.LargeCoverBean large_image) {
    List<ImageInfo> imageInfo = new ArrayList<>();
    ImageInfo imageInfo_1 = new ImageInfo();
    imageInfo_1.setImageViewHeight(large_image.getHeight());
    imageInfo_1.setImageViewWidth(large_image.getWidth());
    imageInfo_1.setThumbnailUrl(large_image.getUrl_list().get(0).getUrl());
    imageInfo_1.setBigImageUrl(large_image.getUrl_list().get(0).getUrl());
    imageInfo.add(imageInfo_1);
    Intent intent = new Intent(mContext, ImagePreviewActivity.class);
    Bundle bundle = new Bundle();
    bundle.putSerializable(ImagePreviewActivity.IMAGE_INFO, (Serializable) imageInfo);
    bundle.putInt(ImagePreviewActivity.CURRENT_ITEM, 0);
    intent.putExtras(bundle);
    mContext.startActivity(intent);
    ((Activity) mContext).overridePendingTransition(0, 0);
}
 
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:17,代码来源:MainTab1Adapter.java

示例4: convert

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
@Override
protected void convert(BaseViewHolder baseViewHolder, final GankModel model) {
    baseViewHolder.setText(R.id.title, model.desc)//
            .setText(R.id.desc, model.desc)//
            .setText(R.id.pubDate, model.publishedAt.toString())//
            .setText(R.id.source, model.source);

    View view = baseViewHolder.getConvertView();
    view.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            WebActivity.runActivity(mContext, model.desc, model.url);
        }
    });

    NineGridView nineGrid = baseViewHolder.getView(R.id.nineGrid);
    ArrayList<ImageInfo> imageInfo = new ArrayList<>();
    if (model.images != null) {
        for (String image : model.images) {
            ImageInfo info = new ImageInfo();
            info.setThumbnailUrl(image);
            info.setBigImageUrl(image);
            imageInfo.add(info);
        }
    }
    nineGrid.setAdapter(new NineGridViewClickAdapter(mContext, imageInfo));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:NewsAdapter.java

示例5: nineTest

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
private void nineTest() {
    List<ImageInfo> imageInfoList = new ArrayList<>();
    for (int i = 0; i < 9; i++) {
        ImageInfo imageInfo = new ImageInfo();
        imageInfo.setBigImageUrl("http://img1a.xgo-img.com.cn/pics/1538/a1537491.jpg");
        imageInfo.setThumbnailUrl("http://img1a.xgo-img.com.cn/pics/1538/a1537491.jpg");
        imageInfoList.add(imageInfo);
    }

    nineGridView.setAdapter(new NineGridViewClickAdapter(this, imageInfoList));
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:12,代码来源:Main2Activity.java

示例6: onBindViewHolder

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
    if (holder instanceof ThroughtViewHolder) {
        ThroughtViewHolder viewHolder = (ThroughtViewHolder) holder;
        ThoughtsBean.ResultsBean bean = mResultsBeen.get(position);
        Long addtime = (long) bean.getCreatedDateTime();
        Long result_time = addtime * 1000;
        String date = new java.text.SimpleDateFormat("MM-dd HH:mm").format(result_time);
        Glide.with(mContext).load(bean.getAvatar()).asBitmap()
                .transform(new GlideCircleTransform(mContext))
                .into(viewHolder.mIvTour);
        viewHolder.mTvName.setText(bean.getNickname());
        viewHolder.mTvTime.setText(date);
        viewHolder.mTvCommentCount.setText(bean.getCommentCnt());
        viewHolder.mTvViewCount.setText(bean.getViewCnt());
        viewHolder.mTvContent.setText(bean.getContent());
        if (bean.getGender().equals("1")) {  //男生
            viewHolder.mIvGender.setBackgroundDrawable(mContext
                    .getResources().getDrawable(R.drawable.sex_man1));
        } else if (bean.getGender().equals("0")) {  //女生
            viewHolder.mIvGender.setBackgroundDrawable(mContext
                    .getResources().getDrawable(R.drawable.sex_gril1));
        }

        //NineGridView nineGrid = baseViewHolder.getView(R.id.nineGrid);
        ArrayList<ImageInfo> imageInfo = new ArrayList<>();  //获取到图片地址集合
        //也就是用户发朋友圈的那种,添加图片
        List<String> images = bean.getPhotos();
        if (images != null) {
            for (String image : images) {
                //ImageInfo 是他的实体类,用于image的地址
                ImageInfo info = new ImageInfo();
                info.setThumbnailUrl(image);
                info.setBigImageUrl(image);
                imageInfo.add(info);
            }
        }
        viewHolder.mPhotoRecycler.setAdapter(new NineGridViewClickAdapter(mContext, imageInfo));

        if (images != null && images.size() == 1) {
            //如果用户只发了一张图片的话,就设置图片的宽和高
            viewHolder.mPhotoRecycler.setSingleImageSize(300);
            viewHolder.mPhotoRecycler.setSingleImageRatio(1);
            //holder.mPhotoRecycler.setSingleImageRatio(images.get(0).width * 1.0f / images.get(0).height);
        }

        viewHolder.mCommentRe.setVisibility(View.GONE);
        List<CommentsBean> comments = bean.getComments();
        if (comments != null && comments.size() > 0) {
            CommentAdapter adapter = new CommentAdapter(comments);
            viewHolder.mCommentRe.setVisibility(View.VISIBLE);
            viewHolder.mCommentRecycler.setLayoutManager(new LinearLayoutManager(mContext));
            //  holder.mCommentRecycler.addItemDecoration(new DividerItemDecoration(mContext
            //,DividerItemDecoration.VERTICAL_LIST));
            viewHolder.mCommentRecycler.setItemAnimator(new DefaultItemAnimator());
            viewHolder.mCommentRecycler.setAdapter(adapter);
        }

    }

}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:62,代码来源:ThroughtAdapter.java

示例7: initUI

import com.lzy.ninegrid.ImageInfo; //导入方法依赖的package包/类
private void initUI(ResultsEntity resultsEntity) {

        mTvviewcount.setText(resultsEntity.getViewCnt());
        mTvcommentcount.setText(resultsEntity.getCommentCnt());
        mTvname.setText(resultsEntity.getNickname());
        Glide.with(this)
                .load(resultsEntity.getAvatar())
                .asBitmap().transform(new GlideCircleTransform(this))
                .into(mIvtour);

        if (resultsEntity.getGender().equals("1")) {  //男生
            mImagegender.setBackgroundDrawable(getResources().getDrawable(R.drawable.sex_man1));
        } else if (resultsEntity.getGender().equals("0")) {  //女生
            mImagegender.setBackgroundDrawable(getResources().getDrawable(R.drawable.sex_gril1));
        }

        Long addtime = (long) resultsEntity.getCreatedDateTime();
        Long result_time = addtime * 1000;
        String date = new SimpleDateFormat("MM-dd HH:mm").format(result_time);
        mTvtime.setText(date);

        mTvcontent.setText(resultsEntity.getContent());

        //NineGridView mNineGrid = baseViewHolder.getView(R.id.mNineGrid);
        ArrayList<ImageInfo> imageInfo = new ArrayList<>();  //获取到图片地址集合
        //也就是用户发朋友圈的那种,添加图片
        List<String> images = resultsEntity.getPhotos();
        if (images != null) {
            for (String image : images) {
                //ImageInfo 是他的实体类,用于image的地址
                ImageInfo info = new ImageInfo();
                info.setThumbnailUrl(image);
                info.setBigImageUrl(image);
                imageInfo.add(info);
            }
        }
        mNineGrid.setAdapter(new NineGridViewClickAdapter(this, imageInfo));

        if (images != null && images.size() == 1) {
            //如果用户只发了一张图片的话,就设置图片的宽和高
            mNineGrid.setSingleImageSize(300);
            mNineGrid.setSingleImageRatio(1);
            //holder.mPhotoRecycler.setSingleImageRatio(images.get(0).width * 1.0f / images.get(0).height);
        }
    }
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:46,代码来源:CircleFriendsActivity.java


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