ListView间隔设置颜色

AdaptergetView

if (position % 2 == 0)

holder.shoucangbt.setBackgroundColor(

Color.rgb(246, 246, 246));

else

convertView.findViewById(R.id.shoucangbt).setBackgroundColor(

Color.rgb(235, 235, 235)

);

原文地址:https://www.cnblogs.com/androidsuperman/p/3285973.html