Android 生成随机颜色
Android About 319 words工具类
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);
}
}
Views: 3,249 · Posted: 2019-04-14
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...