I have a customview and it's background color must be changed every one or two seconds between two colors for example black and white.I can use canvas.drawARGB()
and invalidate()
to fill canvas with any color.But there are two constant colors that canvas can be colored and calling invalidate
every one or two seconds reduces speed.So I guess if I have two canvas that first is colored white and second black and I change whole canvas in onDraw()
it may be better than calling canvas.drawARGB().Is my guess true?And is it possible?
Note:
My purpose is to avoid of calling canvas.drawARGB()
or canvas.setBitmap()
or some things else.