面试:你懂什么是分布式系统吗?Redis分布式锁都不会?>>>
Adapter的getView中可以设置:
public static final int[] colors = new int[] { 0xffaabb, 0x0099ff};
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = super.getView(position, convertView, parent);
int colorPos = position % colors.length;
view.setBackgroundColor(colors[colorPos]);
return view;
}