What's wrong with my include in RelativeLayout?

前端 未结 2 1473
栀梦
栀梦 2021-02-13 00:49

I want to create an activity with a title bar at top and a navigation bar at bottom. I used include to include the title bar layout and the navigation bar layout in

2条回答
  •  梦如初夏
    2021-02-13 01:29

    In order to override the attributes of the layout you're including, you must also override both the layout width and layout height. If both of those settings are not overridden, any other layout changes you try will be ignored.

    Your layout above

    
    
    

    Should actually be with a wrap content or fill parent, as appropriate.

    
    

提交回复
热议问题