title: RecyclerView with fetching from DB or REST API example
body: <p>I am trying to create an app using material design concepts and I have my data in DB from server. I am planning to use REST API calls and I will be receiving information in JSON format.</p>
  
  <p>I have some knowledge and experience in using ListView and there are options like CursorAdapter, ArrayAdapter etc. But since RecyclerView will be the future in android I would like to use it to create my app.</p>
  
  <p>Can anyone point me to some example or sample implementing this?</p>
  
  <p>When I checked the documentation I am not able to understand passing other data than a array.</p>
  
  <pre><code>mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);
  
      mRecyclerView.setHasFixedSize(true);
  
      // use a linear layout manager
      mLayoutManager = new LinearLayoutManager(this);
      mRecyclerView.setLayoutManager(mLayoutManager);
  
      String[] myDataset = new String[]{"hello", "heyy", "treat"};
  
      // specify an adapter (see also next example)
      mAdapter = new MyAdapter(myDataset);
      mRecyclerView.setAdapter(mAdapter);
  </code></pre>
  
  <p>The myDataset here is an array. how can I use the JSON output from my REST call? and also the implementation of onClick events.</p>