Limit height of ListView on Android

后端 未结 16 1356
广开言路
广开言路 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:25

    This is the cleanest way to do it:

    
      
      
      
        

    It is similar to Angelos's solution but you don't need the linearlayout that wraps up the ListView. Also you can use a FrameLayout which is lighter compare to a LinearLayout to wrap up the Button.

提交回复
热议问题