我使用下面的代码来随机的改变textview的颜色。背景色是黑的,所以有时候有的颜色很难辨认。int r = (rand.nextInt(176) * 80 ) / 256;
int g = (rand.nextInt(176) * 80 ) / 256;
int b = (rand.nextInt(176) * 80 ) / 256;
TextView pos = (TextView) view.findViewById(R.id.position);
pos.setText(((Integer)(position + 1)).toString());
pos.setTextSize(30);
pos.setTextColor(Color.argb(255,r,g,b));
TextView data = (TextView) view.findViewById(R.id.textOfTip);
data.setText(tipsList[position].toString());
data.setTextSize(24);
data.setTextColor(Color.argb(255,r,g,b));请问如何增强 text 颜色的亮度,以便容易辨认呢?
添加回答
举报
0/150
提交
取消