package com.jqyd.utils; import com.jqyd.camera.library.AccessoryDTO; import android.content.Context; /** * <p>图片工厂</p> */ public class PhotoItemFactory{ public static PhotoDataItem createPhotoDataItem(Context context ,final AccessoryDTO photoData){ PhotoDataItem.Param p = new PhotoDataItem.Param(){ @Override public AccessoryDTO getPhotoData() { // TODO Auto-generated method stub return photoData; } }; return new PhotoDataItem(context,p); } public static PhotoDataItem createPhotoDataItem(Context context ,final AccessoryDTO photoData,int width,int height){ PhotoDataItem.Param p = new PhotoDataItem.Param(){ @Override public AccessoryDTO getPhotoData() { return photoData; } }; PhotoDataItem item = null; if(height!=0 && width != 0){ item = new PhotoDataItem(context, p, width, height); } else{ item = new PhotoDataItem(context,p); } return item; } }