I don't know what device you are running on, but on things like the G1 and
myTouch, the touch screen isn't able to accurately detect locations at the
far edges of the screen, so when you reach that area the location will be
pinned to the very far edge and the flag set.  Note that this is referring
to the edge of the -screen-, not wherever your view is.

On Sat, Nov 14, 2009 at 9:16 AM, davemac <davemac...@gmail.com> wrote:

> I was expecting the getEdgeFlags() method of MotionEvent to tell me
> when a MotionEvent had reached the edge of something, but the value
> returned from getEdgeFlags() is *always* zero. Is this the expected
> behavior? The documentation says that the flags indicate when a touch
> has reached the edge of the display. I've tried this on a real device
> and in the emulator, and the location coordinates never quite reach
> the edge of the display, and getEdgeFlags() always returns 0. By
> "never quite reach" I mean that if dragging a finger off the left edge
> of the display, the smallest X I got was 2. Reaching the edge of the
> view doesn't seem to change the value returned either.
>
> I suppose I could set the flags myself using setEdgeFlags() using
> calculations with known dimensions of the object whose edges I care
> about. Is that how it's supposed to be used? Is this broken for now?
>
> Thanks for your help.
>
> - dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to