How can I add blank space to the end of a ListView?

后端 未结 5 1996
一生所求
一生所求 2021-01-04 05:26

I have a number of elements in a ListView that scroll off the screen.

I would like there to be blank space at the end of the View. That is, the user should be able

5条回答
  •  無奈伤痛
    2021-01-04 05:39

    Try the followings:

    View footer = new View(getActivity());
    footer.setLayoutParams( new AbsListView.LayoutParams( LayoutParams.FILL_PARENT, 100 )); 
    // 100 is the height, you can change it.
    mListView.addFooterView(footer, null, false);
    

提交回复
热议问题