I like to create a rectangle that can randomly choose between two colors, either blur or yellow, but how do i give it the choice while creating the rectangle?
private Paint paint = new Paint();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Bitmap bg = Bitmap.createBitmap(480, 800, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas (bg);
paint.setAntiAlias(true);
paint.setColor(Color.BLUE);
paint.setColor(Color.YELLOW);
canvas.drawRect(50, 50, 200, 200, paint);