在Adapter的getView中
if (position % 2 == 0)
holder.shoucangbt.setBackgroundColor(
Color.rgb(246, 246, 246));
else
convertView.findViewById(R.id.shoucangbt).setBackgroundColor(
Color.rgb(235, 235, 235)
);
在Adapter的getView中
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