title: Android Access Fragment Variable
body: <p>What I am basicaly trying is to access a variable inside a Fragment and get rid of it in my activity.</p>
  
  <p>It worked to get the variable of the activity in my fragment but not the other way around:</p>
  
  <p>what I did:</p>
  
  <pre><code>// get method of MainActivity
  final MainActivity activity = (MainActivity) getActivity();
  </code></pre>
  
  <p>is it even possible to make this "the other way around"?</p>
  
  <p>(Access variable of Fragment in my Activity)?</p>