If it is a dialog, it is in scroll mode by default. On Mon, Jul 13, 2009 at 3:57 PM, Quiring, Sam <[email protected]>wrote:
> Hello, I don't think the window is in scroll mode, how can I tell? The > window is pretty small, consisting of just a title, a text box, and one or > two buttons. It is an EditTextPreference, for entering the text value of an > preference. In the example below the window is used for giving a name > (i.e., a Label) to an alarm. The entire window moves when the soft keyboard > appears, including the borders. > > ------------------------------ > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Dianne Hackborn > *Sent:* Monday, July 13, 2009 3:37 PM > *To:* [email protected] > *Subject:* Re: screen Y position not changing after soft keyboard pushes > window up. > > 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 <[email protected]> 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 > [email protected] > > 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. > > > > -- Dianne Hackborn Android framework engineer [email protected] 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
