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


Java GalleryFinal类代码示例

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


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

示例1: onBindViewHolder

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    String path = "";
    PhotoInfo photoInfo = getDatas().get(position);
    if (photoInfo != null) {
        path = photoInfo.getPhotoPath();
    }
    holder.mIvPhoto.setImageResource(R.drawable.ic_gf_default_photo);
    holder.mIvDelete.setImageResource(GalleryFinal.getGalleryTheme().getIconDelete());
    Drawable defaultDrawable = mActivity.getResources().getDrawable(R.drawable.ic_gf_default_photo);
    GalleryFinal.getCoreConfig().getImageLoader().displayImage(mActivity, path, holder.mIvPhoto, defaultDrawable, 100, 100);
    if (!GalleryFinal.getFunctionConfig().isMutiSelect()) {
        holder.mIvDelete.setVisibility(View.GONE);
    } else {
        holder.mIvDelete.setVisibility(View.VISIBLE);
    }
    holder.mIvDelete.setOnClickListener(new OnDeletePhotoClickListener(position));
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:19,代码来源:PhotoEditListAdapter.java

示例2: onOptionsItemSelected

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int itemId = item.getItemId();
    if (itemId == R.id.action_clean_cache) {
        GalleryFinal.cleanCacheFile();
        Toast.makeText(this, "清理成功(Clear success)", Toast.LENGTH_SHORT).show();
    } else {
        //startActivity(new Intent(this, FuncationActivity.class));
    }
    return super.onOptionsItemSelected(item);
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:12,代码来源:MainActivity.java

示例3: onBindViewHolder

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public void onBindViewHolder(PhotoViewHolder holder, int position) {
    PhotoInfo photoInfo = getDatas().get(position);

    String path = "";
    if (photoInfo != null) {
        path = photoInfo.getPhotoPath();
    }

    holder.mIvThumb.setImageResource(R.drawable.ic_gf_default_photo);
    Drawable defaultDrawable = mActivity.getResources().getDrawable(R.drawable.ic_gf_default_photo);
    GalleryFinal.getCoreConfig().getImageLoader().displayImage(mActivity, path, holder.mIvThumb, defaultDrawable, mRowWidth, mRowWidth);
    holder.mView.setAnimation(null);
    if (GalleryFinal.getCoreConfig().getAnimation() > 0) {
        holder.mView.setAnimation(AnimationUtils.loadAnimation(mActivity, GalleryFinal.getCoreConfig().getAnimation()));
    }
    holder.mIvCheck.setImageResource(GalleryFinal.getGalleryTheme().getIconCheck());
    if ( GalleryFinal.getFunctionConfig().isMutiSelect() ) {
        holder.mIvCheck.setVisibility(View.VISIBLE);
        if (mSelectList.get(photoInfo.getPhotoPath()) != null) {
            holder.mIvCheck.setBackgroundColor(GalleryFinal.getGalleryTheme().getCheckSelectedColor());
        } else {
            holder.mIvCheck.setBackgroundColor(GalleryFinal.getGalleryTheme().getCheckNornalColor());
        }
    } else {
        holder.mIvCheck.setVisibility(View.GONE);
    }
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:29,代码来源:PhotoListAdapter.java

示例4: onBindViewHolder

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public void onBindViewHolder(PreviewViewHolder holder, int position) {
    PhotoInfo photoInfo = getDatas().get(position);
    String path = "";
    if (photoInfo != null) {
        path = photoInfo.getPhotoPath();
    }
    holder.mImageView.setImageResource(R.drawable.ic_gf_default_photo);
    Drawable defaultDrawable = mActivity.getResources().getDrawable(R.drawable.ic_gf_default_photo);
    GalleryFinal.getCoreConfig().getImageLoader().displayImage(mActivity, path, holder.mImageView, defaultDrawable, mDisplayMetrics.widthPixels/2, mDisplayMetrics.heightPixels/2);
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:12,代码来源:PhotoPreviewAdapter.java

示例5: onBindViewHolder

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public void onBindViewHolder(FolderViewHolder holder, int position) {
    PhotoFolderInfo photoFolderInfo = getDatas().get(position);

    String path = "";
    PhotoInfo photoInfo = photoFolderInfo.getCoverPhoto();
    if (photoInfo != null) {
        path = photoInfo.getPhotoPath();
    }
    holder.mIvCover.setImageResource(R.drawable.ic_gf_default_photo);
    Drawable defaultDrawable = mActivity.getResources().getDrawable(R.drawable.ic_gf_default_photo);
    GalleryFinal.getCoreConfig().getImageLoader().displayImage(mActivity, path, holder.mIvCover, defaultDrawable, 200, 200);

    holder.mTvFolderName.setText(photoFolderInfo.getFolderName());
    int size = 0;
    if ( photoFolderInfo.getPhotoList() != null ) {
        size = photoFolderInfo.getPhotoList().size();
    }
    holder.mTvPhotoCount.setText(mActivity.getString(R.string.folder_photo_size, size));
    if (GalleryFinal.getCoreConfig().getAnimation() > 0) {
        holder.mView.startAnimation(AnimationUtils.loadAnimation(mActivity, GalleryFinal.getCoreConfig().getAnimation()));
    }
    holder.mIvFolderCheck.setImageResource(GalleryFinal.getGalleryTheme().getIconCheck());
    if (mSelectFolder == photoFolderInfo || (mSelectFolder == null && position == 0)) {
        holder.mIvFolderCheck.setVisibility(View.VISIBLE);
        holder.mIvFolderCheck.setColorFilter(GalleryFinal.getGalleryTheme().getCheckSelectedColor());
    } else {
        holder.mIvFolderCheck.setVisibility(View.GONE);
    }
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:31,代码来源:FolderListAdapter.java

示例6: makeDefault

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
private void makeDefault() {
    if (rotateBitmap == null) {
        return;
    }

    HighlightView hv = new HighlightView(imageView, GalleryFinal.getGalleryTheme().getCropControlColor());
    final int width = rotateBitmap.getWidth();
    final int height = rotateBitmap.getHeight();

    Rect imageRect = new Rect(0, 0, width, height);

    // Make the default size about 4/5 of the width or height
    int cropWidth = Math.min(width, height) * 4 / 5;
    @SuppressWarnings("SuspiciousNameCombination")
    int cropHeight = cropWidth;

    if (aspectX != 0 && aspectY != 0) {
        if (aspectX > aspectY) {
            cropHeight = cropWidth * aspectY / aspectX;
        } else {
            cropWidth = cropHeight * aspectX / aspectY;
        }
    }

    int x = (width - cropWidth) / 2;
    int y = (height - cropHeight) / 2;

    RectF cropRect = new RectF(x, y, x + cropWidth, y + cropHeight);
    hv.setup(imageView.getUnrotatedMatrix(), imageRect, cropRect, aspectX != 0 && aspectY != 0);
    imageView.add(hv);
}
 
开发者ID:YuanPengandy,项目名称:GalleryFinal-master,代码行数:32,代码来源:CropImageActivity.java

示例7: onBindViewHolder

import cn.finalteam.galleryfinal.GalleryFinal; //导入依赖的package包/类
@Override
public void onBindViewHolder(PhotoViewHolder holder, int position) {
    PhotoInfo photoInfo = getDatas().get(position);

    String path = "";
    if (photoInfo != null) {
        path = photoInfo.getPhotoPath();
    }

    holder.mIvThumb.setImageResource(R.drawable.ic_gf_default_photo);
    Drawable defaultDrawable = mActivity.getResources().getDrawable(R.drawable.ic_gf_default_photo);
    GalleryFinal.getCoreConfig().getImageLoader().displayImage(mActivity, path, holder.mIvThumb, defaultDrawable, mRowWidth, mRowWidth);
    holder.mView.setAnimation(null);
    if (GalleryFinal.getCoreConfig().getAnimation() > 0) {
        holder.mView.setAnimation(AnimationUtils.loadAnimation(mActivity, GalleryFinal.getCoreConfig().getAnimation()));
    }
    holder.mIvCheck.setImageResource(GalleryFinal.getGalleryTheme().getIconCheck());
    if ( GalleryFinal.getFunctionConfig().isMutiSelect() ) {
        holder.mIvCheck.setVisibility(View.VISIBLE);
        if (mSelectList.contains(photoInfo)) {
            holder.mIvCheck.setBackgroundColor(GalleryFinal.getGalleryTheme().getCheckSelectedColor());
        } else {
            holder.mIvCheck.setBackgroundColor(GalleryFinal.getGalleryTheme().getCheckNornalColor());
        }
    } else {
        holder.mIvCheck.setVisibility(View.GONE);
    }
}
 
开发者ID:pengjianbo,项目名称:GalleryFinal,代码行数:29,代码来源:PhotoListAdapter.java


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