@@ -0,0 +1,1879 @@
+package cn.finalteam.toolsfinal.adapter;%0A%0Aimport android.content.Context;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0A%0Aimport java.util.List;%0A%0A/**%0A * Desction:%0A * Author:pengjianbo%0A * Date:2015/12/29 0029 16:09%0A */%0Apublic abstract class ViewHolderRecyclingPagerAdapter%3CVH extends ViewHolderRecyclingPagerAdapter.ViewHolder, T%3E extends RecyclingPagerAdapter %7B%0A    private Context mContext;%0A    private List%3CT%3E mList;%0A    private LayoutInflater mInflater;%0A%0A    public ViewHolderRecyclingPagerAdapter(Context context, List%3CT%3E list) %7B%0A        this.mContext = context;%0A        this.mList= list;%0A        this.mInflater = LayoutInflater.from(mContext);%0A    %7D%0A%0A    @Override%0A    public View getView(int position, View convertView, ViewGroup container) %7B%0A        VH holder;%0A        if (convertView == null) %7B%0A            holder = onCreateViewHolder(container, position);%0A            holder.view.setTag(holder);%0A        %7D else %7B%0A            holder = (VH) convertView.getTag();%0A        %7D%0A%0A        onBindViewHolder(holder, position);%0A        return holder.view;%0A    %7D%0A%0A    @Override%0A    public int getCount() %7B%0A        return this.mList.size();%0A    %7D%0A%0A    public abstract VH onCreateViewHolder(ViewGroup parent, int position);%0A%0A    public abstract void onBindViewHolder(VH holder, int position);%0A%0A    public View inflate(int resLayout, ViewGroup parent) %7B%0A        return mInflater.inflate(resLayout, parent, false);%0A    %7D%0A%0A    /**%0A     * %E8%BF%94%E5%9B%9E%E5%88%97%E8%A1%A8%E6%95%B0%E6%8D%AE%0A     *%0A     * @return%0A     */%0A    public List%3CT%3E getDatas() %7B%0A        return this.mList;%0A    %7D%0A%0A    public Context getContext() %7B%0A        return this.mContext;%0A    %7D%0A%0A    public LayoutInflater getLayoutInflater() %7B%0A        return this.mInflater;%0A    %7D%0A%0A    public static class ViewHolder %7B%0A        View view;%0A%0A        public ViewHolder(View view) %7B%0A            this.view = view;%0A        %7D%0A    %7D%0A%7D%0A

添加 recyling page adapter viewholder功能