Replace one fragment with an another fragment

前端 未结 8 1553
再見小時候
再見小時候 2020-12-16 19:37

I want to replace an old Fragment with a new Fragment, but i still get the buttons of the old Fragment that is still visible in the ne

8条回答
  •  清酒与你
    2020-12-16 20:20

    put your next fragment UI elements in Card View. define a LinearLayout or other view groups as root and inside this root create a Card view and put your other elements in Card View . when you inflate it in Card View then the hole of new fragment inflate on the previous fragment.

    
       
    
          ......... your UI Elements .......
          //, for example, define other LinearLayout inside the Card View 
              and put other elements inside it like TextView, Button and 
              so on...     
    
    
    
    
       
    
    

提交回复
热议问题