dtmilano/AndroidViewClient — pull request #3 by deanmorin (2012-08-30 03:56:13+00:00)
Title: Made View.touch more precise

Hi there,

This a great tool that you've made!

I just ran into an issue where View.push() was small TextView links.

It turns out that the notification bar is not included in the View's coordinates, but needs to be considered when doing a device.touch() call (on my device at least). (0, 0) would be just under the notification bar as far as the View is concerned, but is at the top of the notification bar for device.touch().

I added an offset based on the screen density of the device, using the values I found here:
http://stackoverflow.com/questions/3600713/size-of-android-notification-bar-and-title-bar

Use or discard as you see fit.

Cheers,
Dean