title: setLayoutManager NullPointException in RecyclerView
body: <p>I'm trying to receive a list with an array in RecyclerView and get error:</p>
  
  <pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 
  'void android.support.v7.widget.RecyclerView.setLayoutManager
  (android.support.v7.widget.RecyclerView$LayoutManager)'on a null object reference
  </code></pre>
  
  <p>RecyclerView widget's </p>
  
  <pre><code>   &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;
  </code></pre>
  
  <p>I tried to declare LayoutManager to final, but it doesn't help.</p>
  
  <p>Activity code:</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  private RecyclerView recyclerView;
  private Toolbar toolbar;
  private InfAdapter adapter;
  
  
  @Override
  protected void onCreate (Bundle savedInstanceState) {
      super.onCreate (savedInstanceState);
      setContentView (R.layout.activity_main_appbar);
  
      recyclerView = (RecyclerView) findViewById(R.id.drawerList);
  
      recyclerView.setLayoutManager(new LinearLayoutManager(this));
  
      InfAdapter mAdapter = new InfAdapter(this, getData());
      recyclerView.setAdapter(mAdapter);
      recyclerView.setItemAnimator(new DefaultItemAnimator());
  
      toolbar = (Toolbar) findViewById(R.id.app_bar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setDisplayShowHomeEnabled(true);
  
  }
  </code></pre>
  
  <p>Adapter code:</p>
  
  <pre><code>public class InfAdapter extends RecyclerView.Adapter&lt;InfAdapter.MyViewHolder&gt; {
  
    private final Context context;
      private  List&lt;Information&gt; data = Collections.emptyList();
  
  
      public InfAdapter(Context context, List&lt;Information&gt; data){
          this.data = data;
          this.context = context;
      }
  
      @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_row, parent, false);
          return new MyViewHolder(v);
      }
  
  
      @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 has possibly gone wrong?</p>