Android Percentage Layout Height

后端 未结 5 921
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 03:49

I know that it is impossible to set percentages and that you can set a weight of certain images to scale their heights. What I am trying to do though is specify the height o

5条回答
  •  既然无缘
    2020-12-08 04:36

    Just as you said, I'd recommend weights. Percentages would be incredibly useful (don't know why they aren't supported), but one way you could do it is like so:

    
        
        
        
    
    

    The takeaway being that you have an empty View that will take up the remaining space. Not ideal, but it does what you're looking for.

提交回复
热议问题