title: Getting a View from a fragment class inside a FragmentActivity Class
body: <p>I have fragmentActivity class which implements OnTabChangeListener and acts as a host for other fragment classes. Every fragment classes is defined in different XML layout files for their own Layout.</p>
  
  <p>I want to get the View from that fragment class inside the fragmentActivity class.</p>
  
  <p>I have tried : </p>
  
  <pre><code>View view = myFragment.getView();
  Button myButton = (Button) view.findViewById(R.id.my_button);
  myButton.setOnClickListener(new MyClickListener());
  </code></pre>
  
  <p>But doesn't seem to work. </p>
  
  <p>So does anyone know?</p>