I want to pass data between two fragments without using activity and fragment activity.
I don\'t want to pass data between fragments using activity like this : Commu
I think you are trying to pass data from one fragment to another fragment, So try using below code.
Use a Bundle, So write below code in first fragment from where you want to send data.
Fragment fragment = new Fragment();
Bundle bundle = new Bundle();
bundle.putString("message", "From Activity");
fragment.setArguments(bundle);
and to retrieve that data, use the following code in your other fragment
String strtext=getArguments().getString("message");