title: How to return back to a fragment in viewpager from an Activity's fragment
body: <p>I have a <code>viewpager</code> with 2 fragments(A and B) in <code>MainActivity</code>. In the fragments in <code>viewpager</code>, I have a <code>recyclerView</code> for each fragment that contains a list of items. When I click on an item of a fragment <code>viewpager</code>, it displays a new <code>Activity</code> with a new fragment (C) on it. But when I press the back button on toolbar, it always went back to the <code>MainActivity</code> with fragment A of <code>viewpager</code>, even if I click on item of fragment B. </p>
  
  <p>In <code>androidManifest.xml</code>, I added <code>"parentActivity: MainActivity"</code> to the new Activity. If I don't set that, the back button would not response.
  I need help to go back to the correct fragment when I press back button.</p>
  
  <p>I appreciate all answers.</p>