How to add multiple headers throughout a single ListView with addHeaderView()?

前端 未结 4 814
花落未央
花落未央 2020-12-25 08:55

Can Android\'s addHeaderView() be used to add multiple headers throughout a single ListView? Can someone give an example of how to do this?

I was able to accomplish

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-25 09:25

    You can add as many headers as you like by calling addHeaderView() multiple times. You have to do it before setting the adapter to the list view.

提交回复
热议问题