Adding bottom margin to ListView last element

前端 未结 7 1445
夕颜
夕颜 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.

    0 讨论(0)
提交回复
热议问题