android:layout_height 50% of the screen size

前端 未结 10 931
无人共我
无人共我 2020-12-23 16:29

I just implemented a ListView inside a LinearLayout, but I need to define the height of the LinearLayout (it has to be 50% of the screen height).



        
10条回答
  •  清酒与你
    2020-12-23 17:14

    This kind of worked for me. Though FAB doesn't float independently, but now it isn't getting pushed down.

    Observe the weights given inside the LinearLayout

    
    
                
    
                
    
            
    

    Hope this helps :)

提交回复
热议问题