Java Code Examples for android.graphics.Color.CYAN

The following are Jave code examples for showing how to use CYAN of the android.graphics.Color class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: DroidSpeech   File: Activity_DroidSpeech.java   View Source Code Vote up 6 votes
@Override
public void onDroidSpeechFinalResult(String finalSpeechResult)
{
    // Setting the final speech result
    this.finalSpeechResult.setText(finalSpeechResult);

    if(droidSpeech.getContinuousSpeechRecognition())
    {
        int[] colorPallets1 = new int[] {Color.RED, Color.GREEN, Color.BLUE, Color.CYAN, Color.MAGENTA};
        int[] colorPallets2 = new int[] {Color.YELLOW, Color.RED, Color.CYAN, Color.BLUE, Color.GREEN};

        // Setting random color pallets to the recognition progress view
        droidSpeech.setRecognitionProgressViewColors(new Random().nextInt(2) == 0 ? colorPallets1 : colorPallets2);
    }
    else
    {
        stop.setVisibility(View.GONE);
        start.setVisibility(View.VISIBLE);
    }
}
 
Example 2
Project: stars-daydream-android   File: UniverseBuilder.java   View Source Code Vote up 6 votes
UniverseBuilder() {
    width = 600;
    height = 800;
    maxStars = 100;
    maxStarLifespan = 60;
    spawnInterval = 10;
    colorPalette = new int[]{Color.BLACK, Color.GREEN, Color.YELLOW,
            Color.MAGENTA, Color.CYAN, Color.RED};
}
 
Example 3
Project: LucaHome-MediaServer   File: GameSurfaceView.java   View Source Code Vote up 6 votes
private int getColor(@NonNull Piece piece) {
    switch (piece) {
        case T:
            return Color.GREEN;
        case L:
            return Color.RED;
        case Z:
            return Color.YELLOW;
        case S:
            return Color.BLUE;
        case LL:
            return Color.MAGENTA;
        default:
            return Color.CYAN;
    }
}
 
Example 4
Project: GitHub   File: RoundedCornersDrawableTest.java   View Source Code Vote up 5 votes
@Test
public void testSetBorder() {
  float borderWidth = 0.7f;
  int borderColor = Color.CYAN;
  mRoundedCornersDrawable.setBorder(borderColor, borderWidth);
  verify(mCallback).invalidateDrawable(mRoundedCornersDrawable);
  assertEquals(borderColor, mRoundedCornersDrawable.getBorderColor());
  assertEquals(borderWidth, mRoundedCornersDrawable.getBorderWidth(), 0);
}
 
Example 5
Project: Eye   File: PersonInfoView.java   View Source Code Vote up 5 votes
public int getRandomColor() {
    Random random = new Random();

    switch (random.nextInt(10)) {
        case 0:
            return Color.WHITE;
        case 1:
            return Color.BLACK;
        case 2:
            return Color.BLUE;
        case 3:
            return Color.CYAN;
        case 4:
            return Color.YELLOW;
        case 5:
            return Color.GREEN;
        case 6:
            return Color.RED;
        case 7:
            return Color.GRAY;
        case 8:
            return Color.LTGRAY;
        case 9:
            return Color.DKGRAY;
        default:
            return Color.MAGENTA;
    }
}
 
Example 6
Project: SimpleDialogFragments   File: ColorWheelView.java   View Source Code Vote up 5 votes
private void updateShader(){
    int[] gradient = new int[]{Color.RED, Color.YELLOW, Color.GREEN,
            Color.CYAN, Color.BLUE, Color.MAGENTA, Color.RED};
    SweepGradient rainbow = new SweepGradient(center.x, center.y, gradient, null);

    paint.setShader(rainbow);
}
 
Example 7
Project: SSTVEncoder2   File: GridColorPalette.java   View Source Code Vote up 5 votes
static int[] getStandardColors() {
    return new int[]{
            Color.BLACK,
            Color.GRAY,
            Color.LTGRAY,
            Color.WHITE,
            Color.YELLOW,
            Color.CYAN,
            Color.GREEN,
            Color.MAGENTA,
            Color.RED,
            Color.BLUE
    };
}
 
Example 8
Project: SmartMath   File: OGLChartOperator.java   View Source Code Vote up 5 votes
public static int cvtStr2Color(String str)	{
	if (str.trim().toLowerCase(Locale.US).equals("blue"))	{
		return Color.BLUE; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("cyan"))	{
		return Color.CYAN; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("dkgray"))	{
		return Color.DKGRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("gray"))	{
		return Color.GRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("green"))	{
		return Color.GREEN; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("ltgray"))	{
		return Color.LTGRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("magenta"))	{
		return Color.MAGENTA; 	
	/*} else if (str.trim().toLowerCase(Locale.US).equals("orange"))	{
		return Color.ORANGE; 	// Pink and orange are not predefined colors in Android
	} else if (str.trim().toLowerCase(Locale.US).equals("pink"))	{
		return Color.PINK; 	*/
	} else if (str.trim().toLowerCase(Locale.US).equals("red"))	{
		return Color.RED; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("white"))	{
		return Color.WHITE;
	} else if (str.trim().toLowerCase(Locale.US).equals("yellow"))	{
		return Color.YELLOW;
	} else	{
		return Color.BLACK;
	}
}
 
Example 9
Project: SmartMath   File: XYChartOperator.java   View Source Code Vote up 5 votes
public static int cvtStr2Color(String str)	{
	if (str.trim().toLowerCase(Locale.US).equals("blue"))	{
		return Color.BLUE; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("cyan"))	{
		return Color.CYAN; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("dkgray"))	{
		return Color.DKGRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("gray"))	{
		return Color.GRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("green"))	{
		return Color.GREEN; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("ltgray"))	{
		return Color.LTGRAY; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("magenta"))	{
		return Color.MAGENTA; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("red"))	{
		return Color.RED; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("transparent"))	{
		return Color.TRANSPARENT; 	
	} else if (str.trim().toLowerCase(Locale.US).equals("white"))	{
		return Color.WHITE;
	} else if (str.trim().toLowerCase(Locale.US).equals("yellow"))	{
		return Color.YELLOW;
	} else	{
		return Color.BLACK;
	}
}
 
Example 10
Project: AnimatedPullToRefresh-master   File: AnimationHelper.java   View Source Code Vote up 4 votes
public AnimationHelper() {
    interpolator = new LinearOutSlowInInterpolator();
    colorAnimationArray = new int[]{Color.CYAN};
}
 
Example 11
Project: RNLearn_Project1   File: AbstractDrawCommand.java   View Source Code Vote up 4 votes
protected static int getDebugBorderColor() {
  return Color.CYAN;
}
 
Example 12
Project: RNLearn_Project1   File: AbstractDrawCommand.java   View Source Code Vote up 4 votes
protected static int getDebugBorderColor() {
  return Color.CYAN;
}