I have three fragment in an Activity C. they are behaving as tabs. I have to go from a fragment to a new Activity X. Now i want to come back to fragment from Activity X.
You can start the activity that you are navigating to using startActivityForResult() and then while coming back to the previous activity you set the result.In the activity that you are coming back to,show the fragment depending on the resultcode. You can accomplish this task by hiding all the fragments that you dont want to show. This can work even if you are going to another activity from another fragment.