// Path: app/src/main/java/com/createchance/doorgod/util/LogUtil.java
// public class LogUtil {
//     public static final int VERBOSE = 1;
// 
//     public static final int DEBUG = 2;
// 
//     public static final int INFO = 3;
// 
//     public static final int WARN = 4;
// 
//     public static final int ERROR = 5;
// 
//     public static final int NOTHING = 6;
// 
//     public static int level = VERBOSE;
// 
//     public static void v(String tag, String msg) {
//         if (level <= VERBOSE) {
//             Log.v(tag, msg);
//         }
//     }
// 
//     public static void d(String tag, String msg) {
//         if (level <= DEBUG) {
//             Log.d(tag, msg);
//         }
//     }
// 
//     public static void i(String tag, String msg) {
//         if (level <= INFO) {
//             Log.i(tag, msg);
//         }
//     }
// 
//     public static void w(String tag, String msg) {
//         if (level <= WARN) {
//             Log.w(tag, msg);
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (level <= ERROR) {
//             Log.e(tag, msg);
//         }
//     }
// }


import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
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.Glide;
import com.createchance.doorgod.R;
import com.createchance.doorgod.util.LogUtil;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
package com.createchance.doorgod.adapter;




/**
 * Created by gaochao on 26/07/2017.
 */

public class IntrusionRecordDetailsAdapter extends RecyclerView.Adapter<IntrusionRecordDetailsAdapter.ViewHolder> {

    private static final String TAG = "IntrusionRecordAdapter";

    private List<File> mPictureList;

    private Context mContext;

    static class ViewHolder extends RecyclerView.ViewHolder {
        TextView title;
        ImageView content;

        public ViewHolder(View view) {
            super(view);

            title = (TextView) view.findViewById(R.id.intru_details_title);
            content = (ImageView) view.findViewById(R.id.intru_details_content);
        }
    }

    public IntrusionRecordDetailsAdapter(File folder) {
        mPictureList = new ArrayList<>(Arrays.asList(folder.listFiles()));
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        if (mContext == null) {
            mContext = parent.getContext();
        }

        View view = LayoutInflater.from(mContext).inflate(R.layout.intru_details_item, parent, false);
        final IntrusionRecordDetailsAdapter.ViewHolder holder = new IntrusionRecordDetailsAdapter.ViewHolder(view);

        return holder;
    }

    @Override
    public void onBindViewHolder(IntrusionRecordDetailsAdapter.ViewHolder holder, final int position) {
// Path: app/src/main/java/com/createchance/doorgod/util/LogUtil.java
// public class LogUtil {
//     public static final int VERBOSE = 1;
// 
//     public static final int DEBUG = 2;
// 
//     public static final int INFO = 3;
// 
//     public static final int WARN = 4;
// 
//     public static final int ERROR = 5;
// 
//     public static final int NOTHING = 6;
// 
//     public static int level = VERBOSE;
// 
//     public static void v(String tag, String msg) {
//         if (level <= VERBOSE) {
//             Log.v(tag, msg);
//         }
//     }
// 
//     public static void d(String tag, String msg) {
//         if (level <= DEBUG) {
//             Log.d(tag, msg);
//         }
//     }
// 
//     public static void i(String tag, String msg) {
//         if (level <= INFO) {
//             Log.i(tag, msg);
//         }
//     }
// 
//     public static void w(String tag, String msg) {
//         if (level <= WARN) {
//             Log.w(tag, msg);
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (level <= ERROR) {
//             Log.e(tag, msg);
//         }
//     }
// }


// Path: app/src/main/java/com/createchance/doorgod/adapter/IntrusionRecordDetailsAdapter.java
import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
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.Glide;
import com.createchance.doorgod.R;
import com.createchance.doorgod.util.LogUtil;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

package com.createchance.doorgod.adapter;




/**
 * Created by gaochao on 26/07/2017.
 */

public class IntrusionRecordDetailsAdapter extends RecyclerView.Adapter<IntrusionRecordDetailsAdapter.ViewHolder> {

    private static final String TAG = "IntrusionRecordAdapter";

    private List<File> mPictureList;

    private Context mContext;

    static class ViewHolder extends RecyclerView.ViewHolder {
        TextView title;
        ImageView content;

        public ViewHolder(View view) {
            super(view);

            title = (TextView) view.findViewById(R.id.intru_details_title);
            content = (ImageView) view.findViewById(R.id.intru_details_content);
        }
    }

    public IntrusionRecordDetailsAdapter(File folder) {
        mPictureList = new ArrayList<>(Arrays.asList(folder.listFiles()));
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        if (mContext == null) {
            mContext = parent.getContext();
        }

        View view = LayoutInflater.from(mContext).inflate(R.layout.intru_details_item, parent, false);
        final IntrusionRecordDetailsAdapter.ViewHolder holder = new IntrusionRecordDetailsAdapter.ViewHolder(view);

        return holder;
    }

    @Override
    public void onBindViewHolder(IntrusionRecordDetailsAdapter.ViewHolder holder, final int position) {
        LogUtil.d(TAG, mPictureList.get(position).getAbsolutePath());