Example usage for android.graphics Color Color

List of usage examples for android.graphics Color Color

Introduction

In this page you can find the example usage for android.graphics Color Color.

Prototype

public Color() 

Source Link

Document

Creates a new color instance set to opaque black in the ColorSpace.Named#SRGB sRGB color space.

Usage

From source file:Main.java

public static Color getRandomColor() {
    Color color = new Color();
    color.rgb(getRandomNum(255), getRandomNum(255), getRandomNum(255));
    // setBackgroundColor(Color.rgb(getRandomNum(255),getRandomNum(255),getRandomNum(255)))
    return color;
}

From source file:Main.java

private static int getRandomNum(int n) {
    new Color();
    return new Random().nextInt(n);
}

From source file:edu.purdue.vieck.htmlcolorwheel.SliderFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    color = new Color();
}