Separator (divider) after last item of ListView

前端 未结 6 2042
再見小時候
再見小時候 2021-01-31 01:46

When I create a simple layout with only a ListView in it, there is no separator displayed after the last item, which looks a bit ugly.



        
6条回答
  •  爱一瞬间的悲伤
    2021-01-31 02:29

    Add an empty view to top (and/or bottom) to create a divider on top (or bottom)

    myList.addHeaderView(new View(context));
    myList.addFooterView(new View(context));
    

提交回复
热议问题