@@ -0,0 +1,2709 @@
+package ca.antonious.viewcelladapter.sections;%0A%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.view.ViewGroup;%0A%0Aimport ca.antonious.viewcelladapter.viewcells.AbstractViewCell;%0A%0A/**%0A * Created by George on 2017-07-05.%0A */%0A%0Apublic class AdapterWrapperSection%3CTViewHolder extends RecyclerView.ViewHolder%3E extends AbstractSection %7B%0A    private RecyclerView.Adapter%3CTViewHolder%3E adapter;%0A%0A    public AdapterWrapperSection(RecyclerView.Adapter%3CTViewHolder%3E adapter) %7B%0A        this.adapter = adapter;%0A        this.adapter.registerAdapterDataObserver(new AdapterObserver());%0A    %7D%0A%0A    @Override%0A    public AbstractViewCell get(int position) %7B%0A        return new AdapterViewCell(position);%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        return adapter.getItemCount();%0A    %7D%0A%0A    public class AdapterViewCell extends AbstractViewCell%3CTViewHolder%3E %7B%0A        private int position;%0A%0A        public AdapterViewCell(int position) %7B%0A            this.position = position;%0A        %7D%0A%0A        @Override%0A        public int getItemId() %7B%0A            return (int) adapter.getItemId(position);%0A        %7D%0A%0A        @Override%0A        public void bindViewCell(TViewHolder viewHolder) %7B%0A            adapter.bindViewHolder(viewHolder, position);%0A        %7D%0A%0A        @Override%0A        public TViewHolder createViewHolder(ViewGroup parent) %7B%0A            return adapter.createViewHolder(parent, adapter.getItemViewType(position));%0A        %7D%0A    %7D%0A%0A    public class AdapterObserver extends RecyclerView.AdapterDataObserver %7B%0A        @Override%0A        public void onChanged() %7B%0A            super.onChanged();%0A            notifyDataChanged();%0A        %7D%0A%0A        @Override%0A        public void onItemRangeChanged(int positionStart, int itemCount) %7B%0A            super.onItemRangeChanged(positionStart, itemCount);%0A            notifyDataChanged();%0A        %7D%0A%0A        @Override%0A        public void onItemRangeChanged(int positionStart, int itemCount, Object payload) %7B%0A            super.onItemRangeChanged(positionStart, itemCount, payload);%0A            notifyDataChanged();%0A        %7D%0A%0A        @Override%0A        public void onItemRangeInserted(int positionStart, int itemCount) %7B%0A            super.onItemRangeInserted(positionStart, itemCount);%0A            notifyDataChanged();%0A        %7D%0A%0A        @Override%0A        public void onItemRangeRemoved(int positionStart, int itemCount) %7B%0A            super.onItemRangeRemoved(positionStart, itemCount);%0A            notifyDataChanged();%0A        %7D%0A%0A        @Override%0A        public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) %7B%0A            super.onItemRangeMoved(fromPosition, toPosition, itemCount);%0A            notifyDataChanged();%0A        %7D%0A    %7D%0A%7D%0A

Add AdapterWrapperSection that can conform any RecyclerView.Adapter to the expected Section interface