Child of RelativeLayout is not filling the height of the RelativeLayout

后端 未结 8 1792
终归单人心
终归单人心 2021-01-02 01:04

I have a ListView which gets populated with RelativeLayouts. The content of these RelativeLayouts can change and thus change their height respectively. On each RelativeLayou

8条回答
  •  孤独总比滥情好
    2021-01-02 01:19

    I had a similar issue inside the cells of my RecyclerView which had a RelativeLayout as root element.

    A workaround for me was wrapping an extra LinearLayout around the root RelativeLayout element.

    So you card looks like this:

    
    
            
                
    ...
    
    
        
    
    

    Source: https://stackoverflow.com/a/28799251/3708094

提交回复
热议问题