title: Access a method of a Fragment from the ViewPager Activity
body: <p>I have a Fragment with a  method setName() that changes an EditText text, by means of the setText function.</p>
  
  <p>What is the best way to call that method from the activity that hosts that fragment by means of a ViewPager?</p>
  
  <p>In other words, how can I access a Fragment's methods (which change that fragment's layout, for example) from the Activity that hosts that fragment by means of a ViewPager?</p>
  
  <p>I am asking this because I have tried several ways, but always with errors.</p>