Why does the LinearLayout attribute “layout_weight” seem to do the opposite of what I think it should do?

后端 未结 3 1279
无人及你
无人及你 2021-01-18 07:58

I\'m following this tutorial to learn about linear layouts. Here\'s the main layout file:




        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-18 08:31

    
    
    
        
    
            
    
            
    
            
    
            
        
    
        
    
            
    
            
    
            
    
            
        
    
    
    

    enter image description here

    Specify android:weightSum for the parent layout and also android:layout_height="0dp" for child layouts. Please try this. Hope this would help.

提交回复
热议问题