// Path: app/src/main/java/com/zmj/qvod/constant/ImageLoader.java
// public class ImageLoader {
// 
//     public static void load(Context context, String url, ImageView iv) {    //使用Glide加载ImageView(如头像)时，不要使用占位图
//         Glide.with(context).load(url).crossFade().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(iv);
//     }
// 
//     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
//     public static void load(Activity activity, String url, ImageView iv) {    //使用Glide加载ImageView(如头像)时，不要使用占位图
//         if (!activity.isDestroyed()) {
//             Glide.with(activity).load(url).crossFade().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(iv);
//         }
//     }
// 
//     public static void loadAll(Context context, String url, ImageView iv) {    //不缓存，全部从网络加载
//         Glide.with(context).load(url).crossFade().skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(iv);
//     }
// 
//     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
//     public static void loadAll(Activity activity, String url, ImageView iv) {    //不缓存，全部从网络加载
//         if (!activity.isDestroyed()) {
//             Glide.with(activity).load(url).crossFade().skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(iv);
//         }
//     }
// 
//     public static void load(String url, ImageView iv, int type) {    //使用占位图
//         switch (type) {
//             case 320:
//                 Glide.with(VideoApplication.getInstance()).load(url).crossFade(1500).placeholder(R.drawable.default_320).into(iv);
//                 break;
//             case 200:
//                 Glide.with(VideoApplication.getInstance()).load(url).crossFade(1500).placeholder(R.drawable.default_200).into(iv);
//                 break;
//             case 100:
//                 Glide.with(VideoApplication.getInstance()).load(url).placeholder(R.drawable.pic_default).into(iv);
//                 break;
//             default:
//                 break;
//         }
//     }
// 
//     /**
//      * Glide 获得图片缓存路径
//      */
//     public static String getImagePath(String imgUrl) {
//         String path = null;
//         FutureTarget<File> future = Glide.with(VideoApplication.getInstance())
//                 .load(imgUrl)
//                 .downloadOnly(500, 500);
//         try {
//             File cacheFile = future.get();
//             path = cacheFile.getAbsolutePath();
//         } catch (InterruptedException | ExecutionException e) {
//             e.printStackTrace();
//         }
//         return path;
//     }
// }
// 
// Path: app/src/main/java/com/zmj/qvod/module/bean/VideoInfo.java
// public class VideoInfo implements Serializable {
//     public String title;
//     public String pic;
//     public String dataId;
//     public String score;
//     public String airTime;
//     public String moreURL;
//     public String loadType;
//     //    public String description;
// 
// }


import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.zmj.qvod.R;
import com.zmj.qvod.constant.ImageLoader;
import com.zmj.qvod.module.bean.VideoInfo;
package com.zmj.qvod.adapter.viewholder;



/**
 * Created by matt on 2017/3/17.
 */

public class RecommendViewHolder extends BaseViewHolder<VideoInfo> {


    ImageView ivVideo;
    TextView tvTitle;

    public RecommendViewHolder(ViewGroup group) {
        super(group, R.layout.item_video);
        ivVideo = $(R.id.iv_video);
        tvTitle = $(R.id.tv_title);
    }

    @Override
// Path: app/src/main/java/com/zmj/qvod/constant/ImageLoader.java
// public class ImageLoader {
// 
//     public static void load(Context context, String url, ImageView iv) {    //使用Glide加载ImageView(如头像)时，不要使用占位图
//         Glide.with(context).load(url).crossFade().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(iv);
//     }
// 
//     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
//     public static void load(Activity activity, String url, ImageView iv) {    //使用Glide加载ImageView(如头像)时，不要使用占位图
//         if (!activity.isDestroyed()) {
//             Glide.with(activity).load(url).crossFade().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(iv);
//         }
//     }
// 
//     public static void loadAll(Context context, String url, ImageView iv) {    //不缓存，全部从网络加载
//         Glide.with(context).load(url).crossFade().skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(iv);
//     }
// 
//     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
//     public static void loadAll(Activity activity, String url, ImageView iv) {    //不缓存，全部从网络加载
//         if (!activity.isDestroyed()) {
//             Glide.with(activity).load(url).crossFade().skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(iv);
//         }
//     }
// 
//     public static void load(String url, ImageView iv, int type) {    //使用占位图
//         switch (type) {
//             case 320:
//                 Glide.with(VideoApplication.getInstance()).load(url).crossFade(1500).placeholder(R.drawable.default_320).into(iv);
//                 break;
//             case 200:
//                 Glide.with(VideoApplication.getInstance()).load(url).crossFade(1500).placeholder(R.drawable.default_200).into(iv);
//                 break;
//             case 100:
//                 Glide.with(VideoApplication.getInstance()).load(url).placeholder(R.drawable.pic_default).into(iv);
//                 break;
//             default:
//                 break;
//         }
//     }
// 
//     /**
//      * Glide 获得图片缓存路径
//      */
//     public static String getImagePath(String imgUrl) {
//         String path = null;
//         FutureTarget<File> future = Glide.with(VideoApplication.getInstance())
//                 .load(imgUrl)
//                 .downloadOnly(500, 500);
//         try {
//             File cacheFile = future.get();
//             path = cacheFile.getAbsolutePath();
//         } catch (InterruptedException | ExecutionException e) {
//             e.printStackTrace();
//         }
//         return path;
//     }
// }
// 
// Path: app/src/main/java/com/zmj/qvod/module/bean/VideoInfo.java
// public class VideoInfo implements Serializable {
//     public String title;
//     public String pic;
//     public String dataId;
//     public String score;
//     public String airTime;
//     public String moreURL;
//     public String loadType;
//     //    public String description;
// 
// }


// Path: app/src/main/java/com/zmj/qvod/adapter/viewholder/RecommendViewHolder.java
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.zmj.qvod.R;
import com.zmj.qvod.constant.ImageLoader;
import com.zmj.qvod.module.bean.VideoInfo;

package com.zmj.qvod.adapter.viewholder;



/**
 * Created by matt on 2017/3/17.
 */

public class RecommendViewHolder extends BaseViewHolder<VideoInfo> {


    ImageView ivVideo;
    TextView tvTitle;

    public RecommendViewHolder(ViewGroup group) {
        super(group, R.layout.item_video);
        ivVideo = $(R.id.iv_video);
        tvTitle = $(R.id.tv_title);
    }

    @Override
    public void setData(VideoInfo data) {