title: Get view of Fragment from FragmentActivity
body: <p>I have a <code>FragmentActivity</code> where I add a <code>Fragment</code>. 
  Depending on some situation, I want to access <code>Buttons</code> from that fragment's layout and change click listeners of them.</p>
  
  <p>What I do is:</p>
  
  <pre><code>View view = myFragment.getView();
  Button myButton = (Button) view.findViewById(R.id.my_button);
  myButton.setOnClickListener(new MyClickListener());
  </code></pre>
  
  <p>But the <code>view</code> variable is always <code>null</code>.</p>
  
  <p>How can I get the view of the activity?</p>