A problem remains that one cannot immediately rely on getWidth() and getHeight() after for instance a home screen excursion. They may initially return portrait mode values in run() even while one hard- coded a landscape mode in the app manifest. Issue http://code.google.com/p/android/issues/detail?id=1840
For instance I found that getWidth() and getHeight() sometimes returned 320 x 430 to my (landscape) app instead of the expected 480 x 270 after a (portrait) home screen excursion. Why should an app be bothered by and have to catch transition behaviors outside its own manifest-specified behaviors? Isn't it rather the responsibility of the OS to first restore a specified orientation to an app and not let intermediate view values leak into an app's requests for getWidth() and getHeight()? Thanks On Jan 18, 7:01 pm, Romain Guy <[email protected]> wrote: > Hi, > > Just usegetWidth() and getHeight(). You can also use getRight() - > getLeft()/getBottom() - getTop(). > > > > On Sun, Jan 18, 2009 at 9:27 AM, Quartz <[email protected]> wrote: > > > Hello, > > > I have been trying to figure out how to get the actual realized > > dimensions of my view after it has become visible and laid out. By > > that I mean the actual view minus the status bar, title bar and > > progress bar. > > > I tried using the information in onMeasure() but that seems to give me > > info I already know about my View's size. How would I find the "inset" > > information or Window information so I know the exact size of my View > > came out to be? > > > Any hints would be appreciated. Thanks. > > > -Quartz > > -- > Romain Guy > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time > to provide private support. 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 [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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

