本文整理汇总了Java中android.graphics.Color.CYAN属性的典型用法代码示例。如果您正苦于以下问题:Java Color.CYAN属性的具体用法?Java Color.CYAN怎么用?Java Color.CYAN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.graphics.Color
的用法示例。
在下文中一共展示了Color.CYAN属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDroidSpeechFinalResult
@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);
}
}
示例2: UniverseBuilder
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};
}
示例3: getColor
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;
}
}
示例4: testSetBorder
@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);
}
示例5: getRandomColor
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;
}
}
示例6: updateShader
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);
}
示例7: getStandardColors
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
};
}
示例8: cvtStr2Color
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;
}
}
示例9: cvtStr2Color
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;
}
}
示例10: AnimationHelper
public AnimationHelper() {
interpolator = new LinearOutSlowInInterpolator();
colorAnimationArray = new int[]{Color.CYAN};
}
示例11: getDebugBorderColor
protected static int getDebugBorderColor() {
return Color.CYAN;
}