Android Layout: width half of parent

前端 未结 5 465
野的像风
野的像风 2021-02-02 06:36

I have a very simple layout that I can\'t make it looks like I want. It\'s a LinearLayout with a button and a Switch. I want them to show one above the other, but I want their w

5条回答
  •  孤街浪徒
    2021-02-02 07:03

    The trick is to use 0dp for the size you want manage via layout_weight! Try this

        
    
            
    
                
    
                

提交回复
热议问题