public class Constants {
    public static final int PAZE_SIZE = 20;

    public static final String API_URL = "https://gank.io/api/";

    public static final String API_URL_READ = "http://gank.io/xiandu";

    public static final String BUNDLE_KEY_TYPE = "BUNDLE_KEY_TYPE";
    public static final String BUNDLE_KEY_URL = "BUNDLE_KEY_URL";


    public static final String EXTRA_URL = "extra_url";
    public static final String EXTRA_TITLE = "extra_title";
    public static final String EXTRA_LOGO = "extra_logo";

} public abstract class BaseToolbarActivity<P extends BasePresenter> extends BaseActivity<P> {

    @BindView(R.id.toolbar) Toolbar toolbar;


    protected boolean isBack() {
        return false;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.initToolBar(); //初始化ToolBar
    }
    /**
     * 初始化toolbar
     */
    private void initToolBar() {
        if (toolbar == null) {
            throw new IllegalStateException(
                    "The subclass of ToolbarActivity must contain a toolbar.");
        }
        setSupportActionBar(toolbar);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowTitleEnabled(true);//让原始的toolbar的title不显示
            if (isBack()) {
                actionBar.setDisplayHomeAsUpEnabled(true);
            }
        }

//        if (Build.VERSION.SDK_INT >= 21) {
//            toolbar.setElevation(10.6f);
//        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            onBackPressed();
            return true;
        } else {
            return super.onOptionsItemSelected(item);
        }
    }


    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);
    }

    public Toolbar getToolbar() {
        return toolbar;
    }
} public class HeaderAndFooterRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

    private static final int TYPE_HEADER_VIEW = Integer.MIN_VALUE;
    private static final int TYPE_FOOTER_VIEW = Integer.MIN_VALUE + 1;

    /**
     * RecyclerView使用的，真正的Adapter
     */
    private RecyclerView.Adapter<RecyclerView.ViewHolder> mInnerAdapter;

    private ArrayList<View> mHeaderViews = new ArrayList<>();
    private ArrayList<View> mFooterViews = new ArrayList<>();

    private RecyclerView.AdapterDataObserver mDataObserver = new RecyclerView.AdapterDataObserver() {

        @Override
        public void onChanged() {
            super.onChanged();
            notifyDataSetChanged();
        }

        @Override
        public void onItemRangeChanged(int positionStart, int itemCount) {
            super.onItemRangeChanged(positionStart, itemCount);
            notifyItemRangeChanged(positionStart + getHeaderViewsCount(), itemCount);
        }

        @Override
        public void onItemRangeInserted(int positionStart, int itemCount) {
            super.onItemRangeInserted(positionStart, itemCount);
            notifyItemRangeInserted(positionStart + getHeaderViewsCount(), itemCount);
        }

        @Override
        public void onItemRangeRemoved(int positionStart, int itemCount) {
            super.onItemRangeRemoved(positionStart, itemCount);
            notifyItemRangeRemoved(positionStart + getHeaderViewsCount(), itemCount);
        }

        @Override
        public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {
            super.onItemRangeMoved(fromPosition, toPosition, itemCount);
            int headerViewsCountCount = getHeaderViewsCount();
            notifyItemRangeChanged(fromPosition + headerViewsCountCount, toPosition + headerViewsCountCount + itemCount);
        }
    };

    public HeaderAndFooterRecyclerViewAdapter() {
    }

    public HeaderAndFooterRecyclerViewAdapter(RecyclerView.Adapter innerAdapter) {
        setAdapter(innerAdapter);
    }

    /**
     * 设置adapter
     * @param adapter
     */
    public void setAdapter(RecyclerView.Adapter<RecyclerView.ViewHolder> adapter) {

        if (adapter != null) {
            if (!(adapter instanceof RecyclerView.Adapter))
                throw new RuntimeException("your adapter must be a RecyclerView.Adapter");
        }

        if (mInnerAdapter != null) {
            notifyItemRangeRemoved(getHeaderViewsCount(), mInnerAdapter.getItemCount());
            mInnerAdapter.unregisterAdapterDataObserver(mDataObserver);
        }

        this.mInnerAdapter = adapter;
        mInnerAdapter.registerAdapterDataObserver(mDataObserver);
        notifyItemRangeInserted(getHeaderViewsCount(), mInnerAdapter.getItemCount());
    }

    public RecyclerView.Adapter getInnerAdapter() {
        return mInnerAdapter;
    }

    public void addHeaderView(View header) {

        if (header == null) {
            throw new RuntimeException("header is null");
        }

        mHeaderViews.add(header);
        this.notifyDataSetChanged();
    }

    public void addFooterView(View footer) {

        if (footer == null) {
            throw new RuntimeException("footer is null");
        }

        mFooterViews.add(footer);
        this.notifyDataSetChanged();
    }

    /**
     * 返回第一个FoView
     * @return
     */
    public View getFooterView() {
        return  getFooterViewsCount()>0 ? mFooterViews.get(0) : null;
    }

    /**
     * 返回第一个HeaderView
     * @return
     */
    public View getHeaderView() {
        return  getHeaderViewsCount()>0 ? mHeaderViews.get(0) : null;
    }

    public void removeHeaderView(View view) {
        mHeaderViews.remove(view);
        this.notifyDataSetChanged();
    }

    public void removeFooterView(View view) {
        mFooterViews.remove(view);
        this.notifyDataSetChanged();
    }

    public int getHeaderViewsCount() {
        return mHeaderViews.size();
    }

    public int getFooterViewsCount() {
        return mFooterViews.size();
    }

    public boolean isHeader(int position) {
        return getHeaderViewsCount() > 0 && position == 0;
    }

    public boolean isFooter(int position) {
        int lastPosition = getItemCount() - 1;
        return getFooterViewsCount() > 0 && position == lastPosition;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        int headerViewsCountCount = getHeaderViewsCount();
        if (viewType < TYPE_HEADER_VIEW + headerViewsCountCount) {
            return new ViewHolder(mHeaderViews.get(viewType - TYPE_HEADER_VIEW));
        } else if (viewType >= TYPE_FOOTER_VIEW && viewType < Integer.MAX_VALUE / 2) {
            return new ViewHolder(mFooterViews.get(viewType - TYPE_FOOTER_VIEW));
        } else {
            return mInnerAdapter.onCreateViewHolder(parent, viewType - Integer.MAX_VALUE / 2);
        }
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
        int headerViewsCountCount = getHeaderViewsCount();
        if (position >= headerViewsCountCount && position < headerViewsCountCount + mInnerAdapter.getItemCount()) {
            mInnerAdapter.onBindViewHolder(holder, position - headerViewsCountCount);
        } else {
            ViewGroup.LayoutParams layoutParams = holder.itemView.getLayoutParams();
            if(layoutParams instanceof StaggeredGridLayoutManager.LayoutParams) {
                ((StaggeredGridLayoutManager.LayoutParams) layoutParams).setFullSpan(true);
            }
        }
    }

    @Override
    public int getItemCount() {
        return getHeaderViewsCount() + getFooterViewsCount() + mInnerAdapter.getItemCount();
    }

    @Override
    public int getItemViewType(int position) {
        int innerCount = mInnerAdapter.getItemCount();
        int headerViewsCountCount = getHeaderViewsCount();
        if (position < headerViewsCountCount) {
            return TYPE_HEADER_VIEW + position;
        } else if (headerViewsCountCount <= position && position < headerViewsCountCount + innerCount) {

            int innerItemViewType = mInnerAdapter.getItemViewType(position - headerViewsCountCount);
            if(innerItemViewType >= Integer.MAX_VALUE / 2) {
                throw new IllegalArgumentException("your adapter's return value of getViewTypeCount() must < Integer.MAX_VALUE / 2");
            }
            return innerItemViewType + Integer.MAX_VALUE / 2;
        } else {
            return TYPE_FOOTER_VIEW + position - headerViewsCountCount - innerCount;
        }
    }

    public static class ViewHolder extends RecyclerView.ViewHolder {
        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}
 public class AlphaAnimatorAdapter<T extends RecyclerView.ViewHolder> extends AnimatorAdapter<T> {

    public AlphaAnimatorAdapter(RecyclerView.Adapter<T> adapter, RecyclerView recyclerView) {
        super(adapter, recyclerView);
    }

    @NonNull
    @Override
    public Animator[] getAnimators(@NonNull View view) {
        return new Animator[0];
    }
} public class SlideInOutBottomItemAnimator extends BaseItemAnimator {

    private float mOriginalY;
    private float mDeltaY;

    public SlideInOutBottomItemAnimator(RecyclerView recyclerView) {
        super(recyclerView);
    }

    protected void animateRemoveImpl(final RecyclerView.ViewHolder holder) {
        final View view = holder.itemView;

        final ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);
        mRemoveAnimations.add(holder);
        animation.setDuration(getRemoveDuration())
                .alpha(0)
                .translationY(+mDeltaY)
                .setListener(new VpaListenerAdapter() {
                    @Override
                    public void onAnimationStart(View view) {
                        dispatchRemoveStarting(holder);
                    }

                    @Override
                    public void onAnimationEnd(View view) {
                        animation.setListener(null);
                        ViewCompat.setAlpha(view, 1);
                        ViewCompat.setTranslationY(view, +mDeltaY);
                        dispatchRemoveFinished(holder);
                        mRemoveAnimations.remove(holder);
                        dispatchFinishedWhenDone();
                    }
                }).start();
    }

    @Override
    protected void prepareAnimateAdd(RecyclerView.ViewHolder holder) {
        retrieveItemPosition(holder);
        ViewCompat.setTranslationY(holder.itemView, +mDeltaY);
    }

    protected void animateAddImpl(final RecyclerView.ViewHolder holder) {
        final View view = holder.itemView;

        final ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);
        mAddAnimations.add(holder);
        animation.translationY(0)
                .alpha(1)
                .setDuration(getAddDuration())
                .setListener(new VpaListenerAdapter() {
                    @Override
                    public void onAnimationStart(View view) {
                        dispatchAddStarting(holder);
                    }

                    @Override
                    public void onAnimationCancel(View view) {
                        ViewCompat.setAlpha(view, 1);
                        ViewCompat.setTranslationY(view, 0);
                    }

                    @Override
                    public void onAnimationEnd(View view) {
                        animation.setListener(null);
                        ViewCompat.setAlpha(view, 1);
                        ViewCompat.setTranslationY(view, 0);
                        dispatchAddFinished(holder);
                        mAddAnimations.remove(holder);
                        dispatchFinishedWhenDone();
                    }
                }).start();
    }


    private void retrieveItemPosition(final RecyclerView.ViewHolder holder) {
        mOriginalY = mRecyclerView.getLayoutManager().getDecoratedTop(holder.itemView);
        mDeltaY = mRecyclerView.getHeight() - mOriginalY;
    }


} public class SuperRefreshLayout extends SwipeRefreshLayout implements SwipeRefreshLayout.OnRefreshListener {

    private Activity mActivity;
    private RecyclerView mRecyclerView;
    private OnSuperRefreshLayoutListener superRefreshLayoutListener;

    private boolean loadMore = true;

    public SuperRefreshLayout(Context context) {
        this(context, null);
    }

    public SuperRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        setColorSchemeResources(
                R.color.primary, R.color.accent,
                R.color.primary_dark, R.color.primary_light);
        setOnRefreshListener(this);
    }

    @Override
    public boolean canChildScrollUp() {
        if (mRecyclerView != null) {
            return ViewCompat.canScrollVertically(mRecyclerView, -1);
        }
        return super.canChildScrollUp();
    }

    /**
     * 获取RecyclerView并添加Footer
     */
    public void setRecyclerView(Activity activity, RecyclerView recyclerView) {
        if (recyclerView != null) {
            mActivity=activity;
            mRecyclerView = recyclerView;
            mRecyclerView.addOnScrollListener(new RecyclerViewOnScroll(this));
        }
    }

    public void refresh(){
        setRefreshing(true);
        if (superRefreshLayoutListener != null) {
            superRefreshLayoutListener.onRefreshing();
        }
    }

    @Override
    public void onRefresh() {
        if (superRefreshLayoutListener != null) {
            superRefreshLayoutListener.onRefreshing();
        }
    }

    public void loadMore() {
        LoadingFooter.State state = RecyclerViewStateUtils.getFooterViewState(mRecyclerView);
        if(state == LoadingFooter.State.Loading) {
            Log.d("@Cundong", "the state is Loading, just wait..");
            return;
        }

        RecyclerViewStateUtils.setFooterViewState(mActivity, mRecyclerView, 2, LoadingFooter.State.Loading, null);
        if (superRefreshLayoutListener != null) {
            superRefreshLayoutListener.onLoadMore();
        }
    }

    public void onFooterError(){
        RecyclerViewStateUtils.setFooterViewState(mActivity, mRecyclerView, 2, LoadingFooter.State.NetWorkError, v -> loadMore());
    }

    public void onFooterEnd(){
        setLoadMore(false);
        RecyclerViewStateUtils.setFooterViewState(mActivity, mRecyclerView, 2, LoadingFooter.State.TheEnd, v ->{
            setLoadMore(true);
            loadMore();
        });
    }

    /**
     * 加载结束记得调用
     */
    public void onLoadComplete() {
        if(isRefreshing()){
            // 防止刷新消失太快，让子弹飞一会儿.
            postDelayed(() -> setRefreshing(false), 1000);
        }

        RecyclerViewStateUtils.setFooterViewState(mRecyclerView, LoadingFooter.State.Normal);
    }

    public boolean isLoadMore() {
        return loadMore;
    }

    public void setLoadMore(boolean loadMore) {
        this.loadMore = loadMore;
    }

    public void setOnSuperRefreshLayoutListener(OnSuperRefreshLayoutListener superRefreshLayoutListener) {
        this.superRefreshLayoutListener = superRefreshLayoutListener;
    }

    public interface OnSuperRefreshLayoutListener {
        void onRefreshing();

        void onLoadMore();
    }
}
 public class ReadListBean implements Parcelable {

    private String title;
    private String time;
    private String source;
    private String logo;
    private String link;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.time);
        dest.writeString(this.source);
        dest.writeString(this.logo);
        dest.writeString(this.link);
    }

    public ReadListBean() {
    }

    protected ReadListBean(Parcel in) {
        this.title = in.readString();
        this.time = in.readString();
        this.source = in.readString();
        this.logo = in.readString();
        this.link = in.readString();
    }

    public static final Creator<ReadListBean> CREATOR = new Creator<ReadListBean>() {
        @Override
        public ReadListBean createFromParcel(Parcel source) {
            return new ReadListBean(source);
        }

        @Override
        public ReadListBean[] newArray(int size) {
            return new ReadListBean[size];
        }
    };
} public class RequestCommand {

    /**
     * 获取首页干货
     */
    public static final int REQUEST_HOME_GANK = 0;
    /**
     * 响应提交干货
     */
    public static final int RESPONSE_SUBMIT_GANK = 1;
    /**
     * 获取妹子福利
     */
    public static final int REQUEST_GIRL_IMAGE = 2;
    /**
     * 获取休闲视频
     */
    public static final int REQUEST_VIDEO_LIST = 3;
    /**
     * 获取闲读分类
     */
    public static final int REQUEST_READ_TYPE = 4;
    /**
     * 获取闲读列表
     */
    public static final int REQUEST_READ_LIST = 5;
    /**
     * 获取闲读子类列表
     */
    public static final int REQUEST_READ_CHILD_LIST = 6;

    /**
     * 获取随机妹子图片
     */
    public static final int REQUEST_RANDOM_GIRL = 7;

} public class RequestContext implements Serializable {

    private static final long serialVersionUID = 1L;

    /**请求ID*/
    private int requestID;
    /**当接口里的*/
    private Map<String,Object> valueMap;

    private String type;
    private String url;
    private String desc;
    private String who;
    private int page;

    public RequestContext() {

    }

    public RequestContext(int requestID){

        this.requestID = requestID;
    }

    public int getRequestID() {
        return requestID;
    }

    public void setRequestID(int requestID) {
        this.requestID = requestID;
    }

    public Map<String, Object> getValueMap() {
        return valueMap;
    }

    public void setValueMap(Map<String, Object> valueMap) {
        this.valueMap = valueMap;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getWho() {
        return who;
    }

    public void setWho(String who) {
        this.who = who;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

} public class ImageUtils {

    private static final String AUTHORITY_IMAGES = BuildConfig.APPLICATION_ID + ".images";



    /**
     * 保存图片
     *
     * @param context
     * @param bitmap  图片
     */
    public static File storeImageFile(Context context,Bitmap bitmap) {
        String name=context.getString(R.string.app_name)+"/image";
        File file = new File(Environment.getExternalStorageDirectory(),name);
        if (!file.exists()) {
            file.mkdir();
        }
        String timeStamp = new SimpleDateFormat("yyyyMMddHHmmss")
                .format(new Date());
        String fileName= timeStamp + ".jpg";
        File pictureFile = new File(file, fileName);

        try {
            FileOutputStream fos = new FileOutputStream(pictureFile);
            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
            fos.flush();
            fos.close();
        } catch (FileNotFoundException e) {
            Log.d("ImageUtils","File not found: " + e.getMessage());
        } catch (IOException e) {
            Log.d("ImageUtils","Error accessing file: " + e.getMessage());
        }

        return pictureFile;
    }


    public static void saveImage(File file,Bitmap bitmap) {
        try {
            if (file.exists()) {
                file.delete();
            }
            FileOutputStream fos = new FileOutputStream(file);
            assert bitmap != null;
            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
            fos.flush();
            fos.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    /**
     * 根据原图和变长绘制圆形图片
     *
     * @param bitmap
     * @return
     */
    public static Bitmap getRoundedCornerBitmap(Bitmap bitmap) {
        Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(),Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(output);
        final Paint paint = new Paint();
        //保证是方形，并且从中心画
        int width = bitmap.getWidth();
        int height = bitmap.getHeight();
        int w;
        int deltaX = 0;
        int deltaY = 0;
        if (width <= height) {
            w = width;
            deltaY = height - w;
        } else {
            w = height;
            deltaX = width - w;
        }
        final Rect rect = new Rect(deltaX, deltaY, w, w);
        final RectF rectF = new RectF(rect);
        paint.setAntiAlias(true);
        canvas.drawARGB(0, 0, 0, 0);
        //圆形，所有只用一个
        int radius = (int) (Math.sqrt(w * w * 2.0d) / 2);
        canvas.drawRoundRect(rectF, radius, radius, paint);
        paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
        canvas.drawBitmap(bitmap, rect, rect, paint);
        return output;

    }
}
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.dalingge.gankio.Constants;
import com.dalingge.gankio.R;
import com.dalingge.gankio.common.base.BaseToolbarActivity;
import com.dalingge.gankio.common.factory.RequiresPresenter;
import com.dalingge.gankio.common.widgets.recyclerview.adapter.HeaderAndFooterRecyclerViewAdapter;
import com.dalingge.gankio.common.widgets.recyclerview.anim.adapter.AlphaAnimatorAdapter;
import com.dalingge.gankio.common.widgets.recyclerview.anim.itemanimator.SlideInOutBottomItemAnimator;
import com.dalingge.gankio.common.widgets.recyclerview.refresh.SuperRefreshLayout;
import com.dalingge.gankio.data.model.ReadListBean;
import com.dalingge.gankio.network.RequestCommand;
import com.dalingge.gankio.network.RequestContext;
import com.dalingge.gankio.utils.ImageUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
package com.dalingge.gankio.module.read;





@RequiresPresenter(ReadMorePresenter.class)
public class ReadMoreActivity extends BaseToolbarActivity<ReadMorePresenter> implements SuperRefreshLayout.OnSuperRefreshLayoutListener{

    @BindView(R.id.recycle_view)
    RecyclerView recyclerView;
    @BindView(R.id.swipe_refresh_widget)
    SuperRefreshLayout superRefreshLayout;

    private String mUrl, mTitle, mLogo;

    private ArrayList<ReadListBean> mData = new ArrayList<>();
    private ReadAdapter mReadAdapter;
    private String url_page;

    public static void start(Context context, String extraURL, String extraTitle, String extraLogo) {
        Intent intent = new Intent(context, ReadMoreActivity.class);
        intent.putExtra(Constants.EXTRA_URL, extraURL);
        intent.putExtra(Constants.EXTRA_TITLE, extraTitle);
        intent.putExtra(Constants.EXTRA_LOGO, extraLogo);
        context.startActivity(intent);
    }

    @Override
    public boolean isBack() {
        return true;
    }

    @Override
    protected int getLayout() {
        return R.layout.activity_read_more;
    }

    @Override
    protected void initView() {
        mUrl = getIntent().getStringExtra(Constants.EXTRA_URL);
        mTitle = getIntent().getStringExtra(Constants.EXTRA_TITLE);
        mLogo = getIntent().getStringExtra(Constants.EXTRA_LOGO);
        getToolbar().setTitle("   "+mTitle);
        Glide.with(this)
                .load(mLogo)
                .asBitmap()
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .centerCrop()
                .into(new SimpleTarget<Bitmap>(80,80) {
                    @Override
                    public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
                        getToolbar().setLogo(new BitmapDrawable(getResources(), ImageUtils.getRoundedCornerBitmap(resource)));
                    }
                });

        superRefreshLayout.setOnSuperRefreshLayoutListener(this);
        superRefreshLayout.setRecyclerView(this, recyclerView);
        mReadAdapter = new ReadAdapter(this, mData);
        AlphaAnimatorAdapter animatorAdapter = new AlphaAnimatorAdapter(mReadAdapter, recyclerView);
        LinearLayoutManager mLinearLayoutManager = new LinearLayoutManager(this);
        recyclerView.setLayoutManager(mLinearLayoutManager);
        recyclerView.setHasFixedSize(true);
        recyclerView.setItemAnimator(new SlideInOutBottomItemAnimator(recyclerView));
        recyclerView.setAdapter(new HeaderAndFooterRecyclerViewAdapter(animatorAdapter));