title: Getting empty RecyclerView
body: <p>It is my first time im working with RecyclerView and i have a problem. Im trying to get the View i a DrawerFragment. The Drawer menu is working fine but i cant see the RecyclerView there. Can anyone help me?</p>
  
  <p>This is the Layout of my Fragment:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="#DADADA"
  tools:context="com.example.entwicklung1.designtestapp.NavigationDrawerFragment"
  android:orientation="horizontal"&gt;
  
  &lt;LinearLayout
      android:id="@+id/linid"
      android:layout_width="match_parent"
      android:layout_height="120dp"
      android:background="#0064a7"
      android:paddingLeft="20dp"&gt;
  
      &lt;ImageView
          android:layout_width="240dp"
          android:layout_height="120dp"
          android:elevation="20dp"
          android:gravity="center_vertical"
          android:src="@drawable/zanderlogo" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/drawerList"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
  
      &gt;&lt;/android.support.v7.widget.RecyclerView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here the code:</p>
  
  <pre><code>public class NavigationDrawerFragment extends Fragment {
  private RecyclerView recyclerView;
  
  public static final String PREF_FILE_NAME = "testpref";
  public static final String KEY_USER_LEARNED_DRAWNER = "user_learned_drawer";
  private ActionBarDrawerToggle mDrawerToggle;
  private DrawerLayout mDrawerLayout;
  private MyAdapter adapter;
  
  private boolean mUserLearnedDrawer;
  private boolean mFromSavedInstanceState;
  private View containerView;
  
  public NavigationDrawerFragment() {
      // Required empty public constructor
  }
  
  public  List&lt;Information&gt; getData(){
      List&lt;Information&gt; data = new ArrayList&lt;&gt;();
      int[] icons={R.drawable.ic_number1,R.drawable.ic_number2,R.drawable.ic_number3,R.drawable.ic_number4,R.drawable.ic_number5};
      String[] titles ={"News", "Produkte","Homepage","Kontakt","Anfahrt"};
  
      for(int i=0;i&lt;titles.length; i++){
          Information current=new Information();
          current.iconId=icons[i];
          current.title=titles[i];
          data.add(current);
      }
      return data;
  }
  
  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      mUserLearnedDrawer = Boolean.valueOf(readFromPreferences(getActivity(), KEY_USER_LEARNED_DRAWNER, "false"));
      mFromSavedInstanceState = savedInstanceState != null ? true : false;
  
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View layout=inflater.inflate(R.layout.fragment_navigation_drawer, container, false);
      recyclerView=(RecyclerView)layout.findViewById(R.id.drawerList);
      adapter = new MyAdapter(getActivity(),getData());
      recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
      recyclerView.setAdapter(adapter);
      return layout;
  }
  
  
  
  
  public void setUp(int fragmentId, DrawerLayout drawerLayout, final Toolbar toolbar) {
      containerView=getActivity().findViewById(fragmentId);
      mDrawerLayout = drawerLayout;
      mDrawerToggle = new ActionBarDrawerToggle(getActivity(),
              drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close) {
  
          @Override
          public void onDrawerOpened(View drawerView) {
              super.onDrawerOpened(drawerView);
              if(!mUserLearnedDrawer){
                  mUserLearnedDrawer=true;
                  saveToPreferences(getActivity(),KEY_USER_LEARNED_DRAWNER,mUserLearnedDrawer+"");
              }
              getActivity().supportInvalidateOptionsMenu();
          }
  
          @Override
          public void onDrawerClosed(View drawerView) {
              super.onDrawerClosed(drawerView);
              getActivity().supportInvalidateOptionsMenu();
  
          }
      };
  
      mDrawerLayout.setDrawerListener(mDrawerToggle);
      mDrawerLayout.post(new Runnable() {
          @Override
          public void run() {
              mDrawerToggle.syncState();
              if(!mUserLearnedDrawer &amp;&amp; !mFromSavedInstanceState){
                  mDrawerLayout.openDrawer(containerView);
              }
          }
      });
  }
  
  public static void saveToPreferences(Context context, String preferenceName, String preferenceValue) {
      SharedPreferences sharedPreferences = context.getSharedPreferences(PREF_FILE_NAME, Context.MODE_PRIVATE);
      SharedPreferences.Editor editor = sharedPreferences.edit();
  
      editor.putString(preferenceName, preferenceValue);
      editor.apply();
  }
  
  public static String readFromPreferences(Context context, String preferenceName, String defaultValue) {
      SharedPreferences sharedPreferences = context.getSharedPreferences(PREF_FILE_NAME, Context.MODE_PRIVATE);
      return sharedPreferences.getString(preferenceName, defaultValue);
  }
  }
  </code></pre>
  
  <p>And here the RecyclerView Adapter:</p>
  
  <pre><code>public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.MyViewHolder&gt;{
  private LayoutInflater inflater;
  List&lt;Information&gt; data = Collections.emptyList();
  
  public MyAdapter(Context context,List&lt;Information&gt; data) {
      inflater=LayoutInflater.from(context);
  }
  
  @Override
  public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = inflater.inflate(R.layout.custom_row,parent,false);
      MyViewHolder holder = new MyViewHolder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(MyViewHolder holder, int position) {
  
      Information current = data.get(position);
      holder.title.setText(current.title);
      holder.icon.setImageResource(current.iconId);
  }
  
  @Override
  public int getItemCount() {
      return data.size();
  }
  
  class MyViewHolder extends RecyclerView.ViewHolder {
      TextView title;
      ImageView icon;
  
      public MyViewHolder(View itemView) {
          super(itemView);
          title = (TextView) itemView.findViewById(R.id.listText);
          icon = (ImageView)itemView.findViewById(R.id.listIcon);
      }
  }
  }
  </code></pre>
  
  <p>What am i doing wrong?</p>