title: How do I open a new fragment from another fragment?
body: <p>I tried making a navigation between fragments. I've got the <code>NewFragment.java</code> with the new fragment working. My problem is: </p>
  
  <p>How do I make this <code>onClickListener</code> run <code>NewFragment.java</code> correctly?</p>
  
  <pre><code>button.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
  
          Intent i = new Intent(getActivity(), NewFragment.class);
          startActivity(i);
  
      }
  });
  </code></pre>
  
  <p>FYI: This is from inside a fragment (I don't know if that matters).</p>