findFragmentById always returns null

前端 未结 9 617
时光说笑
时光说笑 2020-12-01 17:31

I\'m defining an ID for my fragment in the xml layout:




        
9条回答
  •  情书的邮戳
    2020-12-01 18:14

    Use the tag as a container in your layout file. Later to replace the fragments from your activity dynamically, you can use the ID of the container to replace the fragments in your activity.

    
    

提交回复
热议问题