// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java
// public class LISConstant {
// 
//     public static final String ALL_IMG_BUCKET = "所有图片";
//     public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview";
//     public static final String CATEGORY_SUFFIX = ".category.PREVIEW";
// //    public static final String FLAG_PRE_SELECTED_IMGS = "pre_selected_imgs";
//     //所要预览的图片的集合
//     public static final String PRE_IMG_DATAS = "preview_imgs";
//     //预览图片的起始位置
//     public static final String PRE_IMG_START_POSITION = "preview_start_img_position";
// }
// 
// Path: library-lis/src/main/java/com/cocolover2/lis/interf/OnPagerUpdateListener.java
// public interface OnPagerUpdateListener {
//     void onSelect(int position);
// 
//     void onDeleted(int position);
// }
// 
// Path: library-lis/src/main/java/com/cocolover2/lis/view/HackyViewPager.java
// public class HackyViewPager extends BounceBackViewPager {
// 
// 
// 	private static final String TAG = "HackyViewPager";
// 
// 	public HackyViewPager(Context context) {
// 		super(context);
// 	}
// 	
// 	public HackyViewPager(Context context, AttributeSet attrs) {
// 		super(context, attrs);
// 	}
// 
// 	@Override
// 	public boolean onInterceptTouchEvent(MotionEvent ev) {
// 		try {
// 			return super.onInterceptTouchEvent(ev);
// 		} catch (IllegalArgumentException e) {
// 			//不理会
// 			Log.e(TAG,"hacky viewpager error1");
// 			return false;
// 		}catch(ArrayIndexOutOfBoundsException e ){
// 			//不理会
// 			Log.e(TAG,"hacky viewpager error2");
// 			return false;
// 		}
// 	}
// 
// }


import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import com.cocolover2.lis.LISConstant;
import com.cocolover2.lis.interf.OnPagerUpdateListener;
import com.cocolover2.lis.R;
import com.cocolover2.lis.view.HackyViewPager;
import java.util.ArrayList;
package com.cocolover2.lis.activity;





public abstract class LisBasePreviewPagerActivity<T> extends AppCompatActivity {

    private FrameLayout topLayout, bottomLayout;
    private ImagePagerAdapter mAdapter;

    private int startPos;
    private ArrayList<T> mImgDatas;
    private OnPagerUpdateListener pagerUpdateListener;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_previewpager);
        mImgDatas = (ArrayList<T>) getIntent().getParcelableArrayListExtra(LISConstant.PRE_IMG_DATAS);
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java
// public class LISConstant {
// 
//     public static final String ALL_IMG_BUCKET = "所有图片";
//     public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview";
//     public static final String CATEGORY_SUFFIX = ".category.PREVIEW";
// //    public static final String FLAG_PRE_SELECTED_IMGS = "pre_selected_imgs";
//     //所要预览的图片的集合
//     public static final String PRE_IMG_DATAS = "preview_imgs";
//     //预览图片的起始位置
//     public static final String PRE_IMG_START_POSITION = "preview_start_img_position";
// }
// 
// Path: library-lis/src/main/java/com/cocolover2/lis/interf/OnPagerUpdateListener.java
// public interface OnPagerUpdateListener {
//     void onSelect(int position);
// 
//     void onDeleted(int position);
// }
// 
// Path: library-lis/src/main/java/com/cocolover2/lis/view/HackyViewPager.java
// public class HackyViewPager extends BounceBackViewPager {
// 
// 
// 	private static final String TAG = "HackyViewPager";
// 
// 	public HackyViewPager(Context context) {
// 		super(context);
// 	}
// 	
// 	public HackyViewPager(Context context, AttributeSet attrs) {
// 		super(context, attrs);
// 	}
// 
// 	@Override
// 	public boolean onInterceptTouchEvent(MotionEvent ev) {
// 		try {
// 			return super.onInterceptTouchEvent(ev);
// 		} catch (IllegalArgumentException e) {
// 			//不理会
// 			Log.e(TAG,"hacky viewpager error1");
// 			return false;
// 		}catch(ArrayIndexOutOfBoundsException e ){
// 			//不理会
// 			Log.e(TAG,"hacky viewpager error2");
// 			return false;
// 		}
// 	}
// 
// }


// Path: library-lis/src/main/java/com/cocolover2/lis/activity/LisBasePreviewPagerActivity.java
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import com.cocolover2.lis.LISConstant;
import com.cocolover2.lis.interf.OnPagerUpdateListener;
import com.cocolover2.lis.R;
import com.cocolover2.lis.view.HackyViewPager;
import java.util.ArrayList;

package com.cocolover2.lis.activity;





public abstract class LisBasePreviewPagerActivity<T> extends AppCompatActivity {

    private FrameLayout topLayout, bottomLayout;
    private ImagePagerAdapter mAdapter;

    private int startPos;
    private ArrayList<T> mImgDatas;
    private OnPagerUpdateListener pagerUpdateListener;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_previewpager);
        mImgDatas = (ArrayList<T>) getIntent().getParcelableArrayListExtra(LISConstant.PRE_IMG_DATAS);
        startPos = getIntent().getIntExtra(LISConstant.PRE_IMG_START_POSITION, 0);