// Path: app/src/main/java/com/dalingge/gankio/data/model/GankBean.java
// public class GankBean implements Serializable {
// 
//     @SerializedName("_id")
//     public String _id;
//     @SerializedName("createdAt")
//     public String createdAt;
//     @SerializedName("desc")
//     public String desc;
//     @SerializedName("publishedAt")
//     public String publishedAt;
//     @SerializedName("source")
//     public String source;
//     @SerializedName("type")
//     public String type;
//     @SerializedName("url")
//     public String url;
//     @SerializedName("used")
//     public boolean used;
//     @SerializedName("who")
//     public String who;
//     @SerializedName("images")
//     public ArrayList<String> images;
// 
// }
// 
// Path: app/src/main/java/com/dalingge/gankio/utils/DateUtils.java
// public class DateUtils {
// 
//     private final static ThreadLocal<SimpleDateFormat> dateFormater = new ThreadLocal<SimpleDateFormat>() {
//         @Override
//         protected SimpleDateFormat initialValue() {
//             return new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
//         }
//     };
// 
//     private static SimpleDateFormat day = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
// 
//     /**
//      * 格式化日期(精确到天)
//      *
//      * @param date
//      * @return
//      */
//     public static String formatDateDetailDay(Date date) {
//         return day.format(date);
//     }
// 
//     /**
//      * 将字符日期转换成Date
//      * @param date
//      * @return
//      * @throws Exception
//      */
//     public static Date parseStringToDate(String date) {
//         try {
//             return dateFormater.get().parse(date);
//         } catch (ParseException e) {
//             return null;
//         }
//     }
// }


import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.DrawableRequestBuilder;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.dalingge.gankio.R;
import com.dalingge.gankio.data.model.GankBean;
import com.dalingge.gankio.utils.DateUtils;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
    }

    class ViewHolder extends RecyclerView.ViewHolder {

        @BindView(R.id.iv_home_gank_img)
        ImageView ivHomeGankImg;
        @BindView(R.id.tv_home_gank_title)
        TextView tvHomeGankTitle;
        @BindView(R.id.tv_home_gank_author)
        TextView tvHomeGankAuthor;
        @BindView(R.id.tv_home_gank_date)
        TextView tvHomeGankDate;

        ViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }

        @OnClick(R.id.card_view)
        public void onClick(View view) {
            if (mOnItemClickListener != null) {
                mOnItemClickListener.onItemClick(view, getAdapterPosition());
            }
        }
    }

    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
        this.mOnItemClickListener = onItemClickListener;
    }

// Path: app/src/main/java/com/dalingge/gankio/data/model/GankBean.java
// public class GankBean implements Serializable {
// 
//     @SerializedName("_id")
//     public String _id;
//     @SerializedName("createdAt")
//     public String createdAt;
//     @SerializedName("desc")
//     public String desc;
//     @SerializedName("publishedAt")
//     public String publishedAt;
//     @SerializedName("source")
//     public String source;
//     @SerializedName("type")
//     public String type;
//     @SerializedName("url")
//     public String url;
//     @SerializedName("used")
//     public boolean used;
//     @SerializedName("who")
//     public String who;
//     @SerializedName("images")
//     public ArrayList<String> images;
// 
// }
// 
// Path: app/src/main/java/com/dalingge/gankio/utils/DateUtils.java
// public class DateUtils {
// 
//     private final static ThreadLocal<SimpleDateFormat> dateFormater = new ThreadLocal<SimpleDateFormat>() {
//         @Override
//         protected SimpleDateFormat initialValue() {
//             return new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
//         }
//     };
// 
//     private static SimpleDateFormat day = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
// 
//     /**
//      * 格式化日期(精确到天)
//      *
//      * @param date
//      * @return
//      */
//     public static String formatDateDetailDay(Date date) {
//         return day.format(date);
//     }
// 
//     /**
//      * 将字符日期转换成Date
//      * @param date
//      * @return
//      * @throws Exception
//      */
//     public static Date parseStringToDate(String date) {
//         try {
//             return dateFormater.get().parse(date);
//         } catch (ParseException e) {
//             return null;
//         }
//     }
// }


// Path: app/src/main/java/com/dalingge/gankio/module/home/gank/GankAdapter.java
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.DrawableRequestBuilder;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.dalingge.gankio.R;
import com.dalingge.gankio.data.model.GankBean;
import com.dalingge.gankio.utils.DateUtils;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

    }

    class ViewHolder extends RecyclerView.ViewHolder {

        @BindView(R.id.iv_home_gank_img)
        ImageView ivHomeGankImg;
        @BindView(R.id.tv_home_gank_title)
        TextView tvHomeGankTitle;
        @BindView(R.id.tv_home_gank_author)
        TextView tvHomeGankAuthor;
        @BindView(R.id.tv_home_gank_date)
        TextView tvHomeGankDate;

        ViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }

        @OnClick(R.id.card_view)
        public void onClick(View view) {
            if (mOnItemClickListener != null) {
                mOnItemClickListener.onItemClick(view, getAdapterPosition());
            }
        }
    }

    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
        this.mOnItemClickListener = onItemClickListener;
    }

    public interface OnItemClickListener {