public void addAdapter(int index,RecyclerView.Adapter adapter){
  LocalAdapter localAdapter=new LocalAdapter(adapter);
  adapters.add(index,localAdapter);
  adapter.registerAdapterDataObserver(localAdapter.observer);
  notifyDataSetChanged();
}

public void addAdapter ( int index , RecyclerView . Adapter adapter ) { LocalAdapter localAdapter = new LocalAdapter ( adapter ) ; adapters . add ( index , localAdapter ) ; adapter . registerAdapterDataObserver ( localAdapter . observer ) ; notifyDataSetChanged ( ) ; }
add the given adapter to the list of merged adapters at the given index .
