I am writing a live wallpaper for android. To test my basic code was working I drew a rectangle in the top left-hand cornor of the screen:
canvas.drawRect(0f,0f,50f,50f,paint);
Half of the rectangle was underneath the bar at the top of the home screen.
I tried to take into account pixel offsets using:
public void onOffsetsChanged(float xOffset, float yOffset,
float xOffsetStep, float yOffsetStep, int xPixelOffset,
int yPixelOffset)
...
canvas.drawRect(0f+xPixelOffset,0f+yPixelOffset,50f+xPixelOffset,50f+yPixelOffset
,paint);
But the rectangle is still drawn underneath the bar. How do find where the bar ends so I can draw below it?
Cheers,
Pete