title: Recyclerview not call onCreateViewHolder
body: <p>My <code>RecyclerView</code> does not call <code>onCreateViewHolder</code>, <code>onBindViewHolder</code> even <code>MenuViewHolder</code> constructor, therefore nothing appears in <code>RecyclerView</code>.
  I put logs for debugging, and no log is shown.
  What might be the problem?</p>
  
  <p>My adapter:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MenuAdapter extends RecyclerView.Adapter&lt;MenuAdapter.MenuViewHolder&gt; {
  private LayoutInflater inflater;
  List&lt;Menu&gt; data = Collections.emptyList();
  
  public MenuAdapter(Context context, List&lt;Menu&gt; data) {
      Log.i("DEBUG", "Constructor");
      inflater = LayoutInflater.from(context);
      Log.i("DEBUG MENU - CONSTRUCTOR", inflater.toString());
      this.data = data;
      for(Menu menu: this.data){
          Log.i("DEBUG MENU - CONSTRUCTOR", menu.menu);
      }
  }
  
  @Override
  public MenuViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = inflater.inflate(R.layout.row_menu, parent, false);
      MenuViewHolder holder = new MenuViewHolder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(MenuViewHolder holder, int position) {
      Log.i("DEBUG MENU", "onBindViewHolder");
      Menu current = data.get(position);
      holder.title.setText(current.menu);
  }
  
  @Override
  public int getItemCount() {
      return 0;
  }
  
  class MenuViewHolder extends RecyclerView.ViewHolder {
      TextView title;
      ImageView icon;
  
      public MenuViewHolder(View itemView) {
          super(itemView);
          title = (TextView) itemView.findViewById(R.id.menuText);
      }
  }
  </code></pre>
  
  <p>My custom row XML:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/menuText"
      android:text="Dummy Text"
      android:layout_gravity="center_vertical"
      android:textColor="#222"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>and my Fragment:</p>
  
  <pre class="lang-java prettyprint-override"><code>public NavigationFragment() {
      // Required empty public constructor
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      mUserLearnedDrawer = Boolean.valueOf(readFromPreferences(getActivity(), KEY_USER_LEARNED_DRAWER, "false"));
      if (savedInstanceState != null) {
          mFromSavedInstaceState = true;
      }
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
  
      View view = inflater.inflate(R.layout.fragment_navigation, container, false);
      RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.drawer_list);
      MenuAdapter adapter = new MenuAdapter(getActivity(), getData());
      recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
      recyclerView.setAdapter(adapter);
      return view;
  }
  </code></pre>