[android-developers] Drawing On a View

2011-07-11 Thread David
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

[android-developers] Drawing in Android View on 2.1 (not 3.0)

2011-05-16 Thread Heuristic
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

[android-developers] Drawing in Android View

2011-05-16 Thread Heuristic
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

Re: [android-developers] Drawing in Android View on 2.1 (not 3.0)

2011-05-16 Thread Romain Guy
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