Limit height of ListView on Android

后端 未结 16 1328
广开言路
广开言路 2020-11-28 23:07

I want to show a button under a ListView. Problem is, if the ListView gets extended (items added...), the button is pushed out of the screen.

16条回答
  •  执笔经年
    2020-11-28 23:40

    wrap content in linear layout

    in List View add: android:layout_weight="1"

    in your Button set fixed height

    
    
    
    
    
     

提交回复
热议问题