You have several options:
Parameters 1: If you need general information between fragments, you can use SharedPreferences to store information. From my point of view, this is a bad idea, because SharedPreferences. This is an example:
SharedPreferences settings = context.getSharedPreferences("Preferences", Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putString("string1", var); editor.putBoolean("bool1", var); ... editor.commit();
Option 2: if you created a fragment, you can create a collection method to save some king of information in the fragment. For example, if you want to pass an array of strings, you can create a var array in a fragment (using the setter method). Later, when you created this fragment, you can use the setter method to pass this array to the fragment.
source share