title: Load a fragment on clicking CardView from RecyclerView
body: <p>I've a <code>RecyclerView</code> and <code>CardView</code> inside it. Now what i want to do is load a simple <code>Fragment</code> on clicking the CardView. I'm not able to do that with FragmentManager or SupportFragmentManager. Please give me some directions.</p>
  
  <p><strong>My RecyclerViewAdapder and ViewHolder are ..</strong></p>
  
  <pre><code>public class RecyclerViewAdapter extends RecyclerView.Adapter&lt;RecyclerViewAdapter.ViewHolder&gt; {
      private String[] eventName;
      private String[] eventBrief;
  
      public static class ViewHolder extends RecyclerView.ViewHolder {
  
          public TextView textViewName, textViewBrief;
          public CardView cardView;
  
          public ViewHolder(View v) {
              super(v);
  
              textViewName = (TextView)v.findViewById(R.id.textViewName);
              textViewBrief = (TextView)v.findViewById(R.id.textViewBrief);
              final Context context = v.getContext();
              cardView = (CardView)v.findViewById(R.id.card_view);
  
              cardView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      EventFragment eventFragment = EventFragment.newInstance();
                      // Load and view eventFragment here??
                  }
              });
          }
      }
  
      public RecyclerViewAdapter(String[] eventName, String[] eventBrief) {
          this.eventName = eventName;
          this.eventBrief = eventBrief;
  
      }
  
      @Override
      public RecyclerViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
                                                     int viewType) {
          View v = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.my_card_view, parent, false);
          return new ViewHolder(v);
      }
  
      @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
          holder.textViewName.setText(eventName[position]);
          holder.textViewBrief.setText(eventBrief[position]);
      }
  
      @Override
      public int getItemCount() {
          return eventName.length;
      }
  }
  </code></pre>