Senden Zeichenfolge aus einem Fragment
DiagnosticListFragment fragmentS1 = new DiagnosticListFragment();
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
Bundle bundle = new Bundle();
bundle.putString(Constants.BundleConstants.USER_ID,user_id);
fragmentS1.setArguments(bundle);
// Store the Fragment in stack
transaction.addToBackStack(null);
transaction.replace(R.id.fragment_parent, fragmentS1).commit();
Wie in anderen Fragment erhalten:
final Bundle bundle = getArguments();
String user_id;
if(bundle != null) {
user_id = user_id = bundle.getString(Constants.BundleConstants.USER_ID);
}