title: RecyclerView giving Null Object Reference when used with MaterialNavigationDrawer Library
body: <p>I'm trying to use <a href="https://github.com/neokree/MaterialNavigationDrawer" rel="nofollow">MaterialNavigationDrawer</a> library. The wiki says:</p>
  
  <p>MaterialNavigationDrawer is an ActionBarActivity, but there are some important changes:</p>
  
  <ul>
  <li>you have an init method</li>
  <li>you must not override onCreate method</li>
  <li>you must not call setContentView method, because the library have it's own layout</li>
  <li>you must not override onBackPressed method, because the library implement it on its own</li>
  </ul>
  
  <p>So I used this code and removed the onCreate method code. I put the RecyclerView initialization code inside the init function (which I was earlier doing in onCreate). </p>
  
  <pre><code>public class MainActivity extends MaterialNavigationDrawer implements
          OffersFragment.OnEnterNameFragmentInteractionListener,
          OfferDetailsFragment.OnShowNamesFragmentInteractionListener {
  
      public static final String TAG = "MainActivity";
  
      RecyclerView recyclerView;
      LinearLayoutManager linearLayoutManager;
  
      @Override
      public void init(Bundle bundle) {
          loadSampleData();
  
          recyclerView = (RecyclerView) findViewById(R.id.rv_offers);
          recyclerView.setHasFixedSize(true);
  
          linearLayoutManager = new LinearLayoutManager(getApplicationContext());
          recyclerView.setLayoutManager(linearLayoutManager);
  
          RecyclerViewAdapter rvAdapter = new RecyclerViewAdapter(this, offerList);
          recyclerView.setAdapter(rvAdapter);
  
  
          MaterialAccount account = new MaterialAccount(this.getResources(),
                  "Akshay","akshay.thapa23@gmail.com",R.drawable.photo, R.drawable.navbar_header);
          account.setTitle("Title");
          this.addAccount(account);
  
          MaterialSection section = newSection("Share", R.drawable.ic_share_grey600_24dp, new OffersFragment());
          this.addSection(section);
  
          MaterialSection settingsSection = newSection("Settings", new OffersFragment());
          this.addBottomSection(settingsSection);
      }
  ....
  ....
  }
  </code></pre>
  
  <p>But this is giving me the below error,  I guess thats not how I'm supposed to do it. Can anyone please help?</p>
  
  <p>Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView$LayoutManager.onMeasure(android.support.v7.widget.RecyclerView$Recycler, android.support.v7.widget.RecyclerView$State, int, int)' <strong>on a null object reference</strong>
              at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:1764)</p>