Hi, if you are using a window in scroll mode, there is actually some special
trickery going on to scroll the window (the window doesn't move, but drawing
inside of it is offset), which probably isn't being taken into account when
you ask for the location on the screen.  Please file a bug report and we'll
try to get it fixed at some point, though I can't guarantee when.

On Mon, Jul 13, 2009 at 2:16 PM, Sam <sam.quir...@windriver.com> wrote:

>
> I previously posted this question on July 3 deep in an existing
> thread.  I have not received an answer.  I've been advised to
> start a new thread.
>
> We have a case where View.getLocationOnScreen() seems
> to have a bug.  The window where this happens is an
> EditTextPreference.  To reproduce the problem:
>
> 1. bring up the AlarmClock app
> 2. click Menu
> 3. click Add Alarm
> 4. click Label
> 5. observe (either with HierarchyViewer or your eyes) the position of
> this window
> 6. click the "Alarm" EditText box
> 7. observe (eyes, HV) the new position of this window
>
> I have modified ViewDebug so it returns two more values for each view:
> the
> two values returned by View.getLocationOnScreen().  I named them
> screenX
> and screenY.  HierarchyViewer (unchanged) displays these values.
>
> Before the window moves (step 5) I see these values from
> HierrarchyViewer:
>
> screenX:     27
> screenY:   229
>
> After the soft keyboard is displayed and the window is pushed up,
> (after step 6), I completely refresh the information in
> HierarchyViewer,
> these values have not changed.  Since the window has definitely
>  moved, I suspect this is a bug.
>
> Is there an alternative way using ViewDebug to getting the screen
> position
> of the EditText box under these circumstances?  I'm stumped.
>
> -Sam
>
> >
>


-- 
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-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to