Replace a fragment programmatically
        Posted  
        
            by 
                Vishal
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Vishal
        
        
        
        Published on 2012-04-12T11:24:20Z
        Indexed on 
            2012/04/12
            11:30 UTC
        
        
        Read the original article
        Hit count: 309
        
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.
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 it take the whole screen area. What can be the problem?
© Stack Overflow or respective owner