Java tutorial
//package com.java2s; import android.graphics.Color; public class Main { public static int randomColor() { return Color.argb(127, ((Long) Math.round(Math.random() * 255)).intValue(), ((Long) Math.round(Math.random() * 255)).intValue(), ((Long) Math.round(Math.random() * 255)).intValue()); } }