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