Adding bottom margin to ListView last element

前端 未结 7 1446
夕颜
夕颜 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 07:02

    Another solution might be that you make a mock view with certain height.

    In your adapter in getViewCount return 2.

    In getCount return yourData.size+1.

    In getViewType check if the element is last element return 2;

    Use this type in getView to populate the mockview.

提交回复
热议问题