渐变listview

1          int red = Color.rgb(217 + (cursor.getPosition() * 2), 0 + (cursor.getPosition() * 22), 22 + (cursor.getPosition() * 1));
2          int black = Color.parseColor("#" + String.valueOf(Integer.toHexString(0x212121 + (cursor.getPosition() * 0x060606))));
3          RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(R.id.relativeLayout_item);
4          relativeLayout.setBackgroundColor(red);
5          relativeLayout.setBackgroundDrawable(grad);

posted on 2013-05-07 17:10  MASAILA  阅读(142)  评论(0)    收藏  举报

导航