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 i
Solution 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 the merge
tag as the root of the layout file and assign the proper rules for the children in that layout. In the Eclipse's graphical editor this layout will not work(the rules will be ignored(quite normal as the editor doesn't know you'll use that layout as the content of a RelativeLayout
)) but on an emulator/real device the rules will be applied.
If you have a sample application where the rules don't work with a merge
tag don't be afraid to post it.
Post a Comment for "How To Use The Merge Tag For A Relativelayout Root?"