title: how to go back to previous fragment on pressing manually back button of individual fragment?
body: <p>I have only one <code>activity</code> and multiple <code>fragments</code> in my application.</p>
  
  <p><strong>Two main fragment A(left) and B(right).</strong></p>
  
  <pre><code>Fragment A1 called from A
  
  B1 called from B
  
  B2 called from B1
  </code></pre>
  
  <p>All <code>fragments</code> have individual back buttons.</p>
  
  <p>So when I press back button of <code>fragment</code> <strong>A1</strong>, it should go back to <strong>A</strong>, similarly when Back button from <strong>B2</strong> is pressed, <strong>B1</strong> appears and from <strong>B1</strong> to <strong>B</strong> and so on.</p>
  
  <p>How to implement this type of functionality?</p>