How to get RelativeLayout working with merge and include?

前端 未结 8 1983
余生分开走
余生分开走 2020-12-02 04:37

I have been trying for a few days now to make my layouts more efficient by converting from using several levels of nested LinearLayouts to one RelativeLay

8条回答
  •  悲哀的现实
    2020-12-02 05:21

    Man, this is old, but it seems to come up at the top of searches, so I'm going to comment.

    I think the trick here is that the tag combined with the tag essentially remove any sort of "parent" view group at that level. So then, who exactly are you asking to "layout_below" someone else? No one. There is no view at that level.

    The tag takes the child views and pops them right into the parent of the tag. You must therefore ask the children in the layout you're including to anchor themselves accordingly.

提交回复
热议问题