Percentage width in a RelativeLayout

后端 未结 14 1975
遥遥无期
遥遥无期 2020-11-22 13:54

I am working on a form layout for a Login Activity in my Android App. The image below is how I want it to look like:

14条回答
  •  迷失自我
    2020-11-22 14:15

    Interestingly enough, building on the answer from @olefevre, one can not only do 50/50 layouts with "invisible struts", but all sorts of layouts involving powers of two.

    For example, here is a layout that cuts the width into four equal parts (actually three, with weights of 1, 1, 2):

    
    
    
        
    
        
    
            
    
            

提交回复
热议问题