title: Add RecyclerView(RecyclerFragment) to a Dialog
body: <p>I have my custom RecyclerView to create a ListView.
  And it works great, when I am trying to populate a list view in my layout's id.</p>
  
  <pre><code>FragmentTransaction ft = getFragmentManager().beginTransaction();
  Bundle bundle = new Bundle();
  bundle.putBoolean("enablePullToRefresh", false);
  GridValues gridValues = new GridValues();
  gridValues.rowViewLayout = R.layout.my_detail_row_view;
  
  gridValues.delegate = this;
  
  mygrid = new CustomGridView(gridValues, bundle);
  mygrid.showAsGrid = true;
  mygrid.spanCount = 2;
  mygrid.layoutOrientation = LinearLayoutManager.VERTICAL;
  mygrid.noRowColor = true;
  mygrid.gridName = "mygrid";
  
  mygrid.setArguments(mygrid.bundle);
  ft.replace(R.id.MyGridContainer, mygrid);
  </code></pre>
  
  <p>Now, I would like to populate a new list inside a dialog.
  How can I do that?</p>
  
  <p>I tried this, Having mygrid as static</p>
  
  <pre><code>public static class MyDialogFragment extends DialogFragment {
      static MyDialogFragment newInstance() {
          return new MyDialogFragment();
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          return mygrid.getView();
      }
  }
  </code></pre>
  
  <p>And then,</p>
  
  <pre><code>FragmentTransaction ft = getFragmentManager().beginTransaction();
  DialogFragment newFragment = MyDialogFragment.newInstance();
  ft.add(R.id.MyGridContainer, newFragment);
  //getView().findViewById(R.id.MyGridContainer).setVisibility(View.VISIBLE);
  ft.commit();
  </code></pre>