title: Getting Data FROM Several EditText hosted in Fragment Back To Activity
body: <p>I have been looking and scouring around the web, even tried to check the official Android doc for "communicating between fragments" or communicating with fragment and activity (<a href="http://developer.android.com/training/basics/fragments/communicating.html" rel="nofollow">http://developer.android.com/training/basics/fragments/communicating.html</a>), and even tried searching a few questions here at StackOverflow just to get a hint to my problem, but none of them seem to answer my case.</p>
  
  <p>I know of the interface listener that is implemented by a host <code>Activity</code> to pass data from <code>Fragment</code> to the host <code>Activity</code>, and used it A LOT in my projects. But I think that model of fragment data passing is actually useful only if there is a "meta" event i.e. <code>onClick</code>, <code>onItemClick</code>, etc) that would fire that custom event.</p>
  
  <p>But for my case, I have a Fragment containing <code>RadioGroup</code>, with the <code>RadioGroup</code>'s content, first of which is a view group with several <code>EditText</code>s, in which I need to send its contents back to the Fragment's host Activity with several other objects. My custom event is being fire by a "meta" event, that is, the <code>RadioGroup.setOnCheckedChangeListener()</code>.
  To visualize, this is how it is layed out in my layout resource:</p>
  
  <p>RadioGroup</p>
  
  <p>-RadioButton 1</p>
  
  <p>--- LinearLayout (which is toggled to be shown by checking RadioButton 1, hidden when other RadioButton is checked) containing several EditText s</p>
  
  <p>------EditText 1</p>
  
  <p>------EditText 2</p>
  
  <p>------EditText 3</p>
  
  <p>------EditText 4</p>
  
  <p>-RadioButton 2</p>
  
  <p>-RadioButton 3</p>
  
  <p>-RadioButton 4</p>
  
  <p>Every time I check RadioButton 1, it toggles to show the LinearLayout with the EditText, obviously it fires setOnCheckedChangeListener() of the RadioGroup, within which it fires my custom event with parameters like a custom object with contents coming from the EditText s. HOWEVER, my custom event won't be called when I don't check the RadioGroup and when I edit/update the EditText.</p>
  
  <p>I think of using <code>EditText.addTextChangedListener()</code> on those <code>EditText</code>s and fire my custom event whenever I fill all the data on my form. But I think it's a bit not elegant to do that, and I guess there would be a more elegant and better, if any, way of passing those EditText data from their host fragment back to the Activity, or may be to get the data from Fragment in to the Activity</p>
  
  <p>My question is, how do I pass OR get data FROM fragment to Activity in which I won't depend on "meta" events to fire my custom event or in some other way around.</p>