title: onCreateViewHolder is never called
body: <p>I am trying to use recyclerView which is inside a fragment.This is fragment is nested inside the viewPager.</p>
  
  <pre><code>public class UniversityDetail extends Fragment {
  
  RecyclerView universityDetailView;
  
  //need to set Adapter
  
  public static UniversityDetail newInstance(){
      return new UniversityDetail();
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
      View view = inflater.inflate(R.layout.fragment_university_lsit,container,false);
      universityDetailView = (RecyclerView)view;
      setupViews();
      return view;
  }
  
  
  private void setupViews(){
      //set the adapter
      UniversityDetailAdapter detailAdapter = new UniversityDetailAdapter(new ArrayList&lt;UniversityDetails&gt;());
      universityDetailView.addItemDecoration(new RecyclerListDecorater(getActivity()));
      universityDetailView.setAdapter(detailAdapter);
      universityDetailView.setLayoutManager(new LinearLayoutManager(getActivity()));
      universityDetailView.setHasFixedSize(false);
  }
  
  public RecyclerView getRecyclerView(){
      return this.universityDetailView;
     }
  }
  </code></pre>
  
  <p>This is the fragment which i want to be inside the viewPager.It returns a recyclerView from onCreateView.</p>
  
  <pre><code>&lt;android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:id="@+id/scroll"
  android:paddingBottom="8dp"
  android:paddingTop="?attr/actionBarSize"
  android:scrollbars="vertical"&gt;
  </code></pre>
  
  <p>
  fragment_university_lsit.xml</p>
  
  <p>recyclerView uses below adapter.</p>
  
  <pre><code>public class UniversityDetailAdapter extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; {
  
  private List&lt;UniversityDetails&gt; universityDetails;
  private static Map&lt;String,String&gt; admissionRecommendation;
  
  @Override
  public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
      ((DetailHolder)holder).bind(universityDetails.get(position));
  }
  
  @Override
  public int getItemCount() {
      return universityDetails.size();
  }
  
  public UniversityDetailAdapter(List&lt;UniversityDetails&gt; details){
      this.universityDetails = details;
  }
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
      Log.d("CreateUniveristyDetail", "onCreateViewHolder: detail called");
      View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.detail_fragment,parent,false);
      return new DetailHolder(itemView);
     }
  }
  </code></pre>
  
  <p>DetailHolder is the class extends ReyclerView.ViewHolder and its implementation is irrelevant here. </p>
  
  <p>The adapter list is upated from handler and notifyDataSetChanged()</p>
  
  <pre><code>private void setup(){
      mHandler = new Handler(Looper.getMainLooper()){
        @Override
          public void handleMessage(Message message){
            if(message.what == ConnectionHandler.DETAILMSG){
                Log.d("detail handle message", "handleMessage: Called");
                List&lt;UniversityDetails&gt; details = (List&lt;UniversityDetails&gt;)message.obj;
                UniversityDetailAdapter adapter = (UniversityDetailAdapter)universityDetail.getRecyclerView().getAdapter();
                adapter.addAll(details);
                adapter.notifyDataSetChanged();
                Log.d("size", "handleMessage: " + adapter.getItemCount());
            }
        }
      };
  }
  </code></pre>
  
  <p>Fragment is created in activity..</p>
  
  <pre><code> private void setupNavigation(){
      ViewPagerAdapter pagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
      universityDetail = UniversityDetail.newInstance();
      pagerAdapter.addFragment(universityDetail);
      mViewPager.setAdapter(pagerAdapter);
  
      //setup the fragment transaction.
  
      headerTab.setViewPager(mViewPager,0);
      //no need to add to back stack
      FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
      transaction.add(R.id.view_pager,universityDetail);
      transaction.commit();
  }
  </code></pre>
  
  <p>Implementation of DetailHolder</p>
  
  <pre><code> public  class DetailHolder extends RecyclerView.ViewHolder{
  
      CardView admissionGeneral;
      public View root;
  
      public DetailHolder (View itemView){
          super(itemView);
          root = itemView;
          admissionGeneral = (CardView)root.findViewById(R.id.admission_general);
      }
  
      public void bind(UniversityDetails detail){
  
          Log.d("detail bind", "bind: binding to recyclerView");
  
          }
      }
  </code></pre>
  
  <p>here the log of adapter.getItemCount(); return 3; thats means something is being added and onCreateViewHolder is supposed to be called but it never is.</p>
  
  <p>The weird thing is i have implemented another recyclerAdapter is the sameProject and its working perfectly fine.</p>