Java tutorial
//package com.java2s; import android.graphics.Color; import java.util.Random; public class Main { public static int randomColor() { Random r = new Random(); int red = r.nextInt(256); int green = r.nextInt(256); int blue = r.nextInt(256); return Color.rgb(red, green, blue); } }