title: Pass data between fragments
body: <p>I want to transfer the user ID from the main Activity to a fragment. </p>
  
  <p>So in the main activity, I do:</p>
  
  <pre><code> Fragment fragment = new Fragment();
   final Bundle bundle = new Bundle();
   bundle.putString("id_User", id);
   Log.i("BUNDLE", bundle.toString());
   fragment.setArguments(bundle); 
  </code></pre>
  
  <p>And in the log I can see</p>
  
  <pre><code>BUNDLE : Bundle[{id_User=1}]
  </code></pre>
  
  <p>In the fragment, I test it in <code>onCreate</code> </p>
  
  <pre><code>Bundle arguments = getArguments();
  if (arguments != null)
  {
  Log.i("BUNDLE != null","NO NULL");
  } else {
  Log.i("BUNDLE == null","NULL");
  }
  </code></pre>
  
  <p>And I have </p>
  
  <pre><code>BUNDLE == null: NULL
  </code></pre>
  
  <p>So the transfer is successful, but how can I receive the data in fragment, please?</p>