Reputation: 321
I want to use android canvas.drawColor() function in codenameone. what is alternative function for this usage in codenameone or how can i implement a function like this?
Thanks in advance.
Upvotes: 0
Views: 99
Reputation: 9103
If you take a look at Javadoc, Graphics
class has 2 methods that will do the job.
First call setColor(int RGB)
and then fillRect(0, 0, getWidth(), getHeight())
.
This is equivalent to canvas.drawColor()
, which in fact is just a shortcut for filling canvas with specified color.
Upvotes: 2