Android生成随机颜色
Android大约 314 字public class ColorUtil {
/**
* 生成随机颜色
* @return
*/
public static int randomColor(){
Random random = new Random();
int red = random.nextInt(200);
int green = random.nextInt(200);
int blue = random.nextInt(200);
return Color.rgb(red,green,blue);
}
}
阅读 467 · 发布于 2019-04-14
————        END        ————
扫描下方二维码关注公众号和小程序↓↓↓

昵称: