I am having issues with by rectangle not stopping (hard coded values due to bugs with grabbing screen height) in addition, when I draw with red paint, I always get a black recta
The Paint(int) constructor doesn't take a color value; those are actually flags.
Just use setColor(int) instead.
If you want it to animate, add a call to invalidate()
to your onDraw()
routine (doesn't really matter where). That way, it keeps getting redrawn, in an endless cycle. Also, call update()
inside onDraw()
as well. Kind of a "poor-man's" animation, but it should get you going.