I want to transfer the user ID from the main Activity to a fragment.
So in the main activity, I do:
Fragment fragment = new Fragment(); final Bund
You can use:
Bundle args = getArguments(); if (args != null && args.containsKey("id_User")) String userId = args.getString("id_User");