@@ -0,0 +1,2034 @@
+package com.chauthai.elasticrecyclerview;%0A%0Aimport android.content.Context;%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0A%0A/**%0A * Created by Chau Thai on 5/17/16.%0A */%0Apublic class AdapterWrapper extends RecyclerView.Adapter %7B%0A    private static final int VIEW_TYPE_FOOTER = 1;%0A    private static final int FOOTER_SIZE = 500;%0A%0A    private Context mContext;%0A    private RecyclerView mRecyclerView;%0A    private RecyclerView.Adapter mAdapter;%0A    private View footerView;%0A%0A    public AdapterWrapper(Context context, RecyclerView recyclerView, RecyclerView.Adapter adapter) %7B%0A        mContext = context;%0A        mAdapter = adapter;%0A        mRecyclerView = recyclerView;%0A        footerView = createFooterView();%0A    %7D%0A%0A    @Override%0A    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) %7B%0A        if (viewType != VIEW_TYPE_FOOTER)%0A            return mAdapter.onCreateViewHolder(parent, viewType);%0A        return new FooterHolder(footerView);%0A    %7D%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) %7B%0A        mAdapter.onBindViewHolder(holder, position);%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        return mAdapter.getItemCount() + 1;%0A    %7D%0A%0A    @Override%0A    public int getItemViewType(int position) %7B%0A        if (position == getItemCount() - 1)%0A            return VIEW_TYPE_FOOTER;%0A%0A        return mAdapter.getItemViewType(position);%0A    %7D%0A%0A    @Override%0A    public void onAttachedToRecyclerView(RecyclerView recyclerView) %7B%0A        mAdapter.onAttachedToRecyclerView(recyclerView);%0A    %7D%0A%0A    private View createFooterView() %7B%0A        View view = new View(mContext);%0A        view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, FOOTER_SIZE));%0A        return view;%0A    %7D%0A%0A    private class FooterHolder extends RecyclerView.ViewHolder %7B%0A        public FooterHolder(View v) %7B%0A            super(v);%0A        %7D%0A    %7D%0A%7D%0A%0A%0A%0A

Add adapter wrapper