I loaded the first bitmap (image1) on the canvas i.e. sized 320 X
312. The second bitmap (image2) is 41 X 41 loaded at x,y - 235, 147.
Overlapped on top of the image1. Now when I do a draw line from x,y -
174, 254 to x,y - 249, 177 in the touch event. The lineTo destination
249, 177 is
I write an Android Java program to animate the moving of Tower of
Hanoi.
The drawing does not show in steps I expected, instead it shows in a
chunk at the end of the drawing. Why?
Also, I use BLUE color to erase the discs moved, then use BLACK
color to draw the missing stick portion. BUT, it does
I write an Android Java program to animate the moving of Tower of
Hanoi.
The drawing does not show in steps I expected, instead it shows in a
chunk at the end of the drawing. Why?
Also, I use BLUE color the erase the discs moved, then use BLACK
color to draw the missing stick portion. BUT, it does
The colors are wrong because you are most likely not updating your Paint
object correctly. As for the animation, it seems like you are simply using a
sleep() inside the drawing code right? If you do, it won't work. A sleep()
will block the rendering thread until it's done. Furthermore, Android
4 matches
Mail list logo