How to use the merge tag for a RelativeLayout root?
问题 I have a custom view which extends RelativeLayout and has its content defined in a xml file (has RelativeLayout as its root). How can I avoid having two RelativeLayouts after the inflation of my custom layout? I tried using the merge tag as my root at the xml, but that way I'm losing all my child views structure. 回答1: I tried using the merge tag as my root at the xml, but that way I'm losing all my child views structure. I doubt that. The merge tag works with no problems, you just need to use