本文整理汇总了Java中com.github.lzyzsd.randomcolor.RandomColor类的典型用法代码示例。如果您正苦于以下问题:Java RandomColor类的具体用法?Java RandomColor怎么用?Java RandomColor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RandomColor类属于com.github.lzyzsd.randomcolor包,在下文中一共展示了RandomColor类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.demo_fragment, null);
RandomColor randomColor = new RandomColor();
int color = randomColor.randomColor();
view.setBackgroundColor(color);
return view;
}
示例2: randomColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int randomColor() {
return new RandomColor().randomColor();
}
示例3: redColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int redColor() {
return new RandomColor().randomColor(RandomColor.Color.RED);
}
示例4: redColors
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int[] redColors(int numberOfRedColors) {
return new RandomColor().random(RandomColor.Color.RED, numberOfRedColors);
}
示例5: greenColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int greenColor() {
return new RandomColor().randomColor(RandomColor.Color.GREEN);
}
示例6: greenColors
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int[] greenColors(int numberOfGreenColors) {
return new RandomColor().random(RandomColor.Color.GREEN, numberOfGreenColors);
}
示例7: blueColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int blueColor() {
return new RandomColor().randomColor(RandomColor.Color.BLUE);
}
示例8: blueColors
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int[] blueColors(int numberOfBlueColors) {
return new RandomColor().random(RandomColor.Color.BLUE, numberOfBlueColors);
}
示例9: monochromeColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int monochromeColor() {
return new RandomColor().randomColor(randomColor(), RandomColor.SaturationType.MONOCHROME, RandomColor.Luminosity.RANDOM);
}
示例10: brightColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int brightColor() {
return new RandomColor().randomColor(randomColor(), RandomColor.SaturationType.RANDOM, RandomColor.Luminosity.BRIGHT);
}
示例11: lightColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int lightColor() {
return new RandomColor().randomColor(randomColor(), RandomColor.SaturationType.RANDOM, RandomColor.Luminosity.LIGHT);
}
示例12: darkColor
import com.github.lzyzsd.randomcolor.RandomColor; //导入依赖的package包/类
@Override
public int darkColor() {
return new RandomColor().randomColor(randomColor(), RandomColor.SaturationType.RANDOM, RandomColor.Luminosity.DARK);
}