// Path: picturepicker/src/main/java/devin/com/picturepicker/adapter/viewholder/ItemFolderListHolder.java
// public class ItemFolderListHolder extends RecyclerView.ViewHolder {
//     private ImageView ivFolderCover;
//     private TextView tvFolderName;
//     private TextView tvPictureCount;
//     private ImageView ivFolderCheck;
// 
//     public ItemFolderListHolder(LayoutInflater inflater, ViewGroup parent) {
//         this(inflater.inflate(R.layout.item_folder_list, parent, false));
//     }
// 
//     public ItemFolderListHolder(View view) {
//         super(view);
//         ivFolderCover = (ImageView) view.findViewById(R.id.iv_folder_cover);
//         tvFolderName = (TextView) view.findViewById(R.id.tv_folder_name);
//         tvPictureCount = (TextView) view.findViewById(R.id.tv_picture_count);
//         ivFolderCheck = (ImageView) view.findViewById(R.id.iv_folder_check);
//     }
// 
//     public TextView getTvFolderName() {
//         return tvFolderName;
//     }
// 
//     public TextView getTvPictureCount() {
//         return tvPictureCount;
//     }
// 
//     public ImageView getIvFolderCheck() {
//         return ivFolderCheck;
//     }
// 
//     public ImageView getIvFolderCover() {
//         return ivFolderCover;
//     }
// }
// 
// Path: picturepicker/src/main/java/devin/com/picturepicker/javabean/PictureFolder.java
// public class PictureFolder implements Serializable {
// 
//     /**
//      * 图片文件夹名称
//      */
//     public String folderName;
//     /**
//      * 图片文件夹绝对路径
//      */
//     public String folderAbsPath;
//     /**
//      *  图片文件夹需要要显示的封面
//      */
//     public PictureItem folderCover;
//     /**
//      * 图片文件夹下所有的图片
//      */
//     public List<PictureItem> pictureItemList;
// 
//     @Override
//     public boolean equals(Object o) {
//         if (o instanceof PictureFolder){
//             PictureFolder folder= (PictureFolder) o;
//             return TextUtils.equals(folder.folderAbsPath,folderAbsPath);
//         }
//         return super.equals(o);
//     }
// }
// 
// Path: picturepicker/src/main/java/devin/com/picturepicker/utils/ImageLoader.java
// public class ImageLoader {
// 
//     public static void load(Context context, String path, ImageView imageView) {
//         RequestOptions requestOptions =
//                 new RequestOptions()
//                         .placeholder(R.drawable.default_picture)
//                         .error(R.drawable.default_picture);
//         Glide.with(context)
//                 .load(path)
//                 .apply(requestOptions)
//                 .into(imageView);
// 
//     }
// }


import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;
import devin.com.picturepicker.R;
import devin.com.picturepicker.adapter.viewholder.ItemFolderListHolder;
import devin.com.picturepicker.javabean.PictureFolder;
import devin.com.picturepicker.utils.ImageLoader;
import static android.view.View.inflate;
    }

    @Override
    public int getCount() {
        return pictureFolderList == null ? 0 : pictureFolderList.size();
    }

    @Override
    public Object getItem(int position) {
        return pictureFolderList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        ItemFolderListHolder holder;
        if (convertView == null) {
            convertView = inflate(context, R.layout.item_folder_list, null);
            holder = new ItemFolderListHolder(convertView);
            convertView.setTag(holder);
        } else {
            holder = (ItemFolderListHolder) convertView.getTag();
        }

        PictureFolder pictureFolder = pictureFolderList.get(position);
// Path: picturepicker/src/main/java/devin/com/picturepicker/adapter/viewholder/ItemFolderListHolder.java
// public class ItemFolderListHolder extends RecyclerView.ViewHolder {
//     private ImageView ivFolderCover;
//     private TextView tvFolderName;
//     private TextView tvPictureCount;
//     private ImageView ivFolderCheck;
// 
//     public ItemFolderListHolder(LayoutInflater inflater, ViewGroup parent) {
//         this(inflater.inflate(R.layout.item_folder_list, parent, false));
//     }
// 
//     public ItemFolderListHolder(View view) {
//         super(view);
//         ivFolderCover = (ImageView) view.findViewById(R.id.iv_folder_cover);
//         tvFolderName = (TextView) view.findViewById(R.id.tv_folder_name);
//         tvPictureCount = (TextView) view.findViewById(R.id.tv_picture_count);
//         ivFolderCheck = (ImageView) view.findViewById(R.id.iv_folder_check);
//     }
// 
//     public TextView getTvFolderName() {
//         return tvFolderName;
//     }
// 
//     public TextView getTvPictureCount() {
//         return tvPictureCount;
//     }
// 
//     public ImageView getIvFolderCheck() {
//         return ivFolderCheck;
//     }
// 
//     public ImageView getIvFolderCover() {
//         return ivFolderCover;
//     }
// }
// 
// Path: picturepicker/src/main/java/devin/com/picturepicker/javabean/PictureFolder.java
// public class PictureFolder implements Serializable {
// 
//     /**
//      * 图片文件夹名称
//      */
//     public String folderName;
//     /**
//      * 图片文件夹绝对路径
//      */
//     public String folderAbsPath;
//     /**
//      *  图片文件夹需要要显示的封面
//      */
//     public PictureItem folderCover;
//     /**
//      * 图片文件夹下所有的图片
//      */
//     public List<PictureItem> pictureItemList;
// 
//     @Override
//     public boolean equals(Object o) {
//         if (o instanceof PictureFolder){
//             PictureFolder folder= (PictureFolder) o;
//             return TextUtils.equals(folder.folderAbsPath,folderAbsPath);
//         }
//         return super.equals(o);
//     }
// }
// 
// Path: picturepicker/src/main/java/devin/com/picturepicker/utils/ImageLoader.java
// public class ImageLoader {
// 
//     public static void load(Context context, String path, ImageView imageView) {
//         RequestOptions requestOptions =
//                 new RequestOptions()
//                         .placeholder(R.drawable.default_picture)
//                         .error(R.drawable.default_picture);
//         Glide.with(context)
//                 .load(path)
//                 .apply(requestOptions)
//                 .into(imageView);
// 
//     }
// }


// Path: picturepicker/src/main/java/devin/com/picturepicker/adapter/PopupFolderListAdapter.java
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;
import devin.com.picturepicker.R;
import devin.com.picturepicker.adapter.viewholder.ItemFolderListHolder;
import devin.com.picturepicker.javabean.PictureFolder;
import devin.com.picturepicker.utils.ImageLoader;
import static android.view.View.inflate;

    }

    @Override
    public int getCount() {
        return pictureFolderList == null ? 0 : pictureFolderList.size();
    }

    @Override
    public Object getItem(int position) {
        return pictureFolderList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        ItemFolderListHolder holder;
        if (convertView == null) {
            convertView = inflate(context, R.layout.item_folder_list, null);
            holder = new ItemFolderListHolder(convertView);
            convertView.setTag(holder);
        } else {
            holder = (ItemFolderListHolder) convertView.getTag();
        }

        PictureFolder pictureFolder = pictureFolderList.get(position);
        ImageLoader.load(context, pictureFolder.folderCover.pictureAbsPath, holder.getIvFolderCover());