Does there exist a Refresh for the activity ? Because when drawing a line nothing is displayed on the Activity. Adding a Butoon moving a Label shows the line.
There seems also be a clipping problem. With lines or bitmaps etc.
Attached a small test program.
By default 'Line' is selected.
Drawing a line, Click-Move-Release, nothing is displayed
Clicking onto the Button, the line is shown.
Run the program again.
Select 'Bitmap'
Click the Button, a map is displayed.
Clicking the Button a second time, there is a clipping acording to the Label choosen to display the Angle.
•Clicking onto the Button, the line is shown.
•The display is clipped around the button.
Actually it doesn't for me, either on the emulator or my device. However Activity.Invalidate is what you are missing to force the screen redraw. It is more efficient to use Invalidate2/3 to refresh just the area that you know has been drawn.
You will have to bear in mind that many Android devices, particularly the smaller ones, are/will be equipped with capacitive touch screens that can be used only with a finger tip, not a stylus, so drawing on them is going to be very imprecise.
@Andrew,
I was aware that the Android devices are only 'hand driven' and not with a stylus and that real drawing will not be possible. Trying to draw lines and circles was to see what could be done and how.
@Erel,
I will have a look at your suggestion with a panel.
You will have to bear in mind that many Android devices, particularly the smaller ones, are/will be equipped with capacitive touch screens that can be used only with a finger tip, not a stylus, so drawing on them is going to be very imprecise.
Perhaps an emulator variant for those devices is needed which has a fuzzy mouse cursor which represents a finger-tip to scale and has an indeterminate hotspot...