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

后端 未结 5 1997
一生所求
一生所求 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:57

    if you have multiple listviews in your app, create an xml of a footer, something like this:

    
    

    and then in the code, use this:

    listView.addFooterView(LayoutInflater.from(getActivity()).inflate(R.layout.empty200, null));
    

提交回复
热议问题