Android Open Source - Gita-Quotes Color Wheel






From Project

Back to project page Gita-Quotes.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project Gita-Quotes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.akhilamobin.gitaquotes;
/* w  w  w . j a v  a 2s  . c o m*/
import android.graphics.Color;

import java.util.Random;

public class ColorWheel {
    private String[] quotes = {"#39add1", // light blue
            "#3079ab", // dark blue
            "#c25975", // mauve
            "#e15258", // red
            "#f9845b", // orange
            "#838cc7", // lavender
            "#7d669e", // purple
            "#53bbb4", // aqua
            "#51b46d", // green
            "#e0ab18", // mustard
            "#637a91", // dark gray
            "#f092b0", // pink
            "#b7c0c7"  // light gray
    };

    private String color = "";

    public int getColor() {


        Random randomGenerator = new Random();
        int randomNumber = randomGenerator.nextInt(quotes.length);

        color = quotes[randomNumber];

        int colorAsInt = Color.parseColor(color);

        return colorAsInt;
    }
}




Java Source Code List

com.akhilamobin.gitaquotes.ApplicationTest.java
com.akhilamobin.gitaquotes.ColorWheel.java
com.akhilamobin.gitaquotes.GitaQuotesActivity.java
com.akhilamobin.gitaquotes.GitaQuotesBook.java