Adding bottom margin to ListView last element

前端 未结 7 1447
夕颜
夕颜 2021-01-30 06:35

I need to add to add ListView with complicated items background: different for even/odd and rounded corners at the top and bottom. It looks like this:

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 06:39

    I guess you want to add margin only to last item:

    So you can do in this manner, in your getview method the index of the list item and check if its the last item, then progrmatically add margin to the view.

提交回复
热议问题