Adding bottom margin to ListView last element

前端 未结 7 1464
夕颜
夕颜 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:46

    you can also do it from code if you want, for example here I react to to EditText different situations:

       if(s.toString().length()>0)
       {
          contacts_lv.setClipToPadding(false);
          contacts_lv.setPadding(0,0,0,270*screenDensity);
       }
       else
       {
          contacts_lv.setClipToPadding(true);
          contacts_lv.setPadding(0,0,0,0);
       }
    

提交回复
热议问题