title: how can i show and hide two fragments
body: <p>I have main activity in which <code>list fragment</code> is shown when the app is launched, then there is <code>floatingbutton</code> in <code>list fragment</code> when that button is clicked it opens next fragment (adding fragment)  and there is again one more button in adding fragment when it is liked then again list fragment is shown in the main activity .</p>
  
  <p>Now I want that when the <code>floating button</code> of list fragment is clicked then list fragment should hide and adding fragment should show and when the floating button of adding fragment is clicked then adding fragment should hide and list fragment should show.</p>
  
  <p>How can I do this thing using hide and show a method of fragment class?</p>
  
  <p>how should I call these methods in both fragments when the floating buttons in both fragments are clicked.</p>