我的应用程序要求列表视图项目具有轻盈但不透明的颜色。我得到的随机颜色通常非常暗,而且我不知道在哪个范围内可以只获取浅色。随机给出的范围如下:
Random rndm = new Random();
int color = Color.argb(255, rndm.nextInt(256), rndm.nextInt(256), rndm.nextInt(256));
RelativeLayout rl=(RelativeLayout)rowView.findViewById(R.id.front);
rl.setBackgroundColor(color);