In my app I have two fragments say fragmentA and FragmentB. When I click on a button in fragmetA, a list is opened in
You can also use SharedPreferences to save some string and after return back to the first fragment load it and clear.
SharedPreferences