title: Replace a fragment programmatically
body: <p>I have three fragments as shown in below figure. I have added all these three fragments in LinearLayout using .xml file and when my launcher activity starts I load that .xml layout using setContentView.<br/><br/>I have some controls on fragment2. Clicking on any one loads the
  fragment4 programmatically using FragmentTransaction and commit method. This fragments is added to the screen but the problem is the prgrammatically added fragment4 take the whole screen area. What can be the problem?<br/><br/>Note: On any item click at f2 I want to replace only f2 with new fragment f4. Keep in mind I have added f1, f2, f3 through xml layout file and adding new fragment f4 programmatically.<br/><br/><img src="https://i.stack.imgur.com/mrANi.png" alt="enter image description here"></p>