title: Displaying recyclerView on MainActivity
body: <p>I'm trying to display my recyclerView on MainActivity, but can't seem to do it.
  This is my code: (which compiles with no errors)</p>
  
  <pre><code>private RecyclerView recyclerView;
  private MyAdapter adapter;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
      recyclerView = (RecyclerView) this.findViewById(R.id.recycler_view_example);
      recyclerView.setLayoutManager(new LinearLayoutManager(this));
  
      adapter = new MyAdapter(this, getData());
  
      recyclerView.setAdapter(adapter);
  
  
      // Add Code to display recyclerView on Main...
  }
  
  // This is not my actual data, just testing it out
  public static List&lt;Block&gt; getData() {
      List&lt;Block&gt; data = new ArrayList&lt;&gt;();
      String[] ids = {"310", "313", "320"};
      String[] names = {"name of three ten", "name of three thirteen", "name of three twenty"};
      for (int i=0; i&lt;ids.length; i++) {
          data.add(new Block(ids[i], names[i]));
      }
      return data;
  }
  </code></pre>
  
  <p>And myActivity Class:</p>
  
  <pre><code>private final LayoutInflater inflater;
  
  // Data: (information)
  List&lt;Block&gt; data = new ArrayList&lt;&gt;();
  
  public MyAdapter(Context context, List&lt;Block&gt; data) {
      inflater = LayoutInflater.from(context);
      this.data = data;
  }
  
  @Override
  public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = inflater.inflate(R.layout.block, parent, false);
      MyViewHolder holder = new MyViewHolder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(RecyclerView.ViewHolder h, int position) {
      MyViewHolder holder = new MyViewHolder(h.itemView);
      Block current = data.get(position);
      holder.id.setText(current.getId());
      holder.name.setText(current.getName());
  
  }
  
  @Override
  public int getItemCount() {
      return 0;
  }
  
  class MyViewHolder extends RecyclerView.ViewHolder {
      TextView id;
      TextView name;
      Button button;
  
      // Constructor
      public MyViewHolder(View itemView) {
          super(itemView);
          id = (TextView) itemView.findViewById(R.id.the_course_id);
          name = (TextView) itemView.findViewById(R.id.course_name);
          button = (Button) itemView.findViewById(R.id.click);
  
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>All I'm trying to do now is that when I run the emulator, I will see the contents of the recyclerView. But, I've been stuck on this for a while as nothing seems to work.
  Mind you I'm a beginner with Android, so forgive me if this is very trivial.</p>