Adapter的getView中可以设置:
public static final int[] colors = new int[] { 0x3000000, 0x300010ff };
        @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;
        }
posted on 2011-07-21 16:28  threecc  阅读(1688)  评论(1编辑  收藏  举报